How can I get nginx-rtmp-module stats for all workers?

Roman Arutyunyan arut at nginx.com
Wed May 10 17:25:02 UTC 2017


Hello,

On Wed, May 10, 2017 at 03:33:26PM +0000, Alexander Chekalin wrote:
> Hello,
> 
> I’ve set up nginx with nginx-rtmp-module as a NGINX-based Media Streaming Server, and it works fine, but now I try to get stats for this server. 
> 
> General approach is to use 
> 
> location /stat {  rtmp_stat all; }
> 
> which produce xml that can be parsed nicely, but my suspicions are that I got stats for one worker random worker on each poll (not accumulated stats for all workers). The host itself is 4-cores, so I have 4 workers running and I think I got confusing stats since each poll brings me stats for random worker.
> 
> Is there any way I can use to get cumulated stats for all workers on host?

Yes, RTMP statistics is only available for a single worker.
For multi-worker statictics there was a patch "per-worker-listener" at
https://github.com/arut/nginx-patches.
However, this solution is not perfect.

-- 
Roman Arutyunyan


More information about the nginx mailing list