sergey-dryabzhinsky / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
1.02k stars 214 forks source link

RRD Graphs on a Per Stream Bases #100

Open winkmichael opened 8 years ago

winkmichael commented 8 years ago

Hello All,

I’ve been wondering if anyone has come up with any good graphs on a per stream bases? I’ve looked at modifying one of the many perl scripts for that use the regular nginx/stats page but I thought I’d check and see if anything already exists? In my case averages based on the stats would probably be good enough.

Anyone parsing the log files to grab the bandwidth usage? Any tools for this?

Cheers, Mike

misiek08 commented 8 years ago

Nothing is public, I saw few scripts in perl or python, but none of this scripts was made public. I'm working on implementing connect arguments to be passed to notify events and then I'll look into it.

skykohai commented 8 years ago

For traffic monitoring you can easily write simple plugin for Munin. You can use iptables byte counters as datasource. Just create an accept rule for --dport 1935 and you can grep its counter iptables -nvxL | awk '/:1935/{print $2}'

For traffic accounting you can use something like that: cat /var/log/nginx/access.log | grep <whatever> | awk '/PUBLISH/{ sum+=$9 } END { print sum; }'