Closed ahsar closed 3 years ago
如果配置worker_processes > 1 或者 auto就不ok
README 里已经明确写了:
English: It's better to specify the directive worker_processes as 1, because ngx_rtmp_stat_module may not get statistics from a specified worker process in multi-processes mode, for HTTP requests are randomly distributed to worker processes. ngx_rtmp_control_module has the same problem. The problem can be optimized by this patch per-worker-listener.
中文: 最好将配置项 worker_processes 设置为 1,因为在多进程模式下,ngx_rtmp_stat_module 可能不会从指定的 worker 进程获取统计数据,因为 HTTP 请求是被随机分配给 worker 进程的。ngx_rtmp_control_module 也有同样的问题。这个问题可以通过这个补丁 per-worker-listener 优化。
要优化这个功能,需要修改 Nginx 本身的代码,请自行修改。
[feature] 增加k/v的stat统计, 便于使用Prometheus 调用. 我使用
有些情况下, nclients统计的数量为0