log_interval

The `log_interval` directive specifies the interval for logging statistics in the NGINX RTMP module for media streaming.

Syntaxlog_interval seconds;
Defaultnone
Context
Arguments1

Description

The log_interval directive is essential for managing how frequently the NGINX RTMP server logs statistics and analytics data. It allows administrators to define a specific time interval, measured in seconds, which determines how often these statistics are flushed to the log files. This configuration is particularly useful for monitoring purposes, as it enables real-time insights into streaming performance, viewer engagement, and resource utilization. The level of detail available in the logs can significantly aid in tuning the server settings and optimizing media delivery, especially during peak loads or when troubleshooting issues.

The parameter for log_interval is a single integer value, which represents the time in seconds. For instance, setting log_interval 60; means that the logs will be updated every minute, providing a balance between server performance and the granularity of the logging data. It's vital to choose an appropriate interval; shorter intervals lead to more frequent logging, which may impact I/O performance, while longer intervals can result in missed opportunities for timely analysis.

Config Example

log_interval 60;

Ensure the value set for log_interval does not excessively impact server performance by logging too frequently.

Remember to monitor disk usage, as frequent logging can lead to large log files quickly depending on the volume of traffic.

← Back to all directives