Wowza Community

completely bypass cache

Hello.

Is there a practical way to track traffic from multiple edge VOD servera based on the subdirectory the video originates in?

For instance, delivering videos from multiple customer accounts which all share the same application and media store configuration on wowza, but who’s content is called from a unique subdomain, I.e

Server.com/app/mp4:client1_directory/filename.Mp4

And

Server.com/app/mp4:client2_directory/filename.Mp4

The only thing that differs is the directory each client’s videos are stored in the media source.

Now across multiple servers, using a utility readily available, is there a way we can count and separate each accounts traffic for invoicing purposes?

Writing a custom log processor is feisible but I thought I’d ask here in case anyone is doing anything similar

What do you guys think? I really appreciate any input anybody has. Thanks.

Is “server.com/app/mp4:client1_directory/filename.Mp4” logged anywhere? If so, and the format doesn’t change (i.e. the client sub-directory always follows mp4: ) then a simple option is to capture the paths into a plain text file and run a sort and count on them, e.g.

List of data to collate, redirected to a file called dirlist:

server.com/app/mp4:client1_directory/filename.mp4
server.com/app/mp4:client2_directory/filename.mp4
server.com/app/mp4:client3_directory/filename.mp4
server.com/app/mp4:client4_directory/filename.mp4
server.com/app/mp4:client2_directory/filename.mp4
server.com/app/mp4:client4_directory/filename.mp4
server.com/app/mp4:client1_directory/filename.mp4
server.com/app/mp4:client3_directory/filename.mp4
server.com/app/mp4:client5_directory/filename.mp4
server.com/app/mp4:client3_directory/filename.mp4

Extract the client*_directory columns, sort them and provide a total per directory:

cat dirlist |awk -F: '{ print $2 }'|awk -F \/ '{ print $1 }'|sort|uniq -c|sort

Output will be totals per directory, sorted from low to high

   1 client5_directory
   2 client1_directory
   2 client2_directory
   2 client4_directory
   3 client3_directory

A bit clunky but costs nothing :).

Paul

[edit]

Just to add, of course the above is if you are on a linux type server, or have something like cygwin installed if running Windows.

Yes, Wowza logs bytes culmatively for server to client and client to server. You can see a description of each log4j field name in the User Guide.

AWstats RegEX sounds like it may give you what you want. Guess it depends on how the data is logged. Could you not concatenate the log files from all servers prior to running the stats on them?

That’s interesting thanks. Expanding slightly, could we manage something more ‘finished’ by simply configuring awstats instances wouls produce separate counts for each different client folder variant it finds?

We could prefix each client folder client-01 client-02

Or even simpler, specifying the OnlyFiles=“REGEX[client-directory/]” option in individual awstats would produce separate reports we could give individual client access to. Do you see an obvious problem with that other than the fact it would mean the same logs being processed multiple times which isn’t efficient.

The wowza logs contain accurate byte counts that could be used to determine client data usage don’t they?

Yes that’s entirely possible. I’ll have a tinker. Thanks :slight_smile: