rtmp_stat_stylesheet

The `rtmp_stat_stylesheet` directive sets the URL for an XML stylesheet used to style the statistics output of the RTMP server.

Syntaxrtmp_stat_stylesheet URL;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The rtmp_stat_stylesheet directive in the NGINX RTMP module is used to specify the path of an XML stylesheet that formats the statistics generated by the RTMP server. This is useful for providing a human-readable view of real-time statistics and data about stream sessions, viewers, and server performance. By providing a custom stylesheet, users can tailor the presentation of this data in a way that best suits their interface or reporting needs.

This directive can be placed in the http, server, or location context, essentially allowing administrators to apply different styles to different parts of their application. When set, the statistics page can be enhanced with various CSS elements defined in the specified stylesheet. The argument to this directive is a single string representing the URL of the stylesheet. If set correctly, whenever the statistics are accessed via the RTMP statistics URL, the output will be formatted according to the specified stylesheet, allowing for better readability and integration into existing web interfaces or dashboards.

It is necessary to ensure that the URL provided is accessible and correctly points to a valid stylesheet, as issues in accessibility can lead to unstyled output. Additionally, the stylesheet should conform to standards that allow proper integration with XML so that the statistics can be rendered as intended.

Config Example

http {
    server {
        listen 80;
        location /stat {
            rtmp_stat on;
            rtmp_stat_stylesheet /path/to/stylesheet.xsl;
        }
    }
}

Ensure the stylesheet URL is correct and accessible; otherwise, it won't load, leaving the output unstyled.

Be aware that stylesheets should be properly structured for XML to ensure compatibility with the statistics output.

← Back to all directives