vhost_traffic_status_filter
The 'vhost_traffic_status_filter' directive enables filtering of the traffic statistics displayed by the NGINX virtual host traffic status module.
Description
The 'vhost_traffic_status_filter' directive is utilized within the NGINX virtual host traffic status module to specify whether or not to filter the traffic statistics based on certain criteria. This directive can be configured at various contexts such as http, server, and location, allowing for flexible application across different server configurations. The parameter accepted by the directive is a flag, which, when set, enables filtering of traffic data, thus allowing users to refine their traffic analysis based on specified parameters.
When activated, the filtering will modify the output of traffic statistics provided by the status module. This can be particularly useful in scenarios where administrators want to limit the visibility of traffic data to certain virtual hosts or for specific types of requests, enhancing performance monitoring and resource management. The flexibility in application context ensures that it can be tailored to specific server setups and reporting requirements. The status module collects traffic metrics based on requests, responses, and resource utilization, and this directive certainly helps in managing what statistics are visible and potentially capturing a more focused set of data that aligns with operational objectives.
Config Example
http {
vhost_traffic_status_zone;
vhost_traffic_status_filter on;
server {
location /status {
vhost_traffic_status_display;
}
}
}Ensure the directive is set in the correct context (http, server, or location) as specified by your use case.
If filtering is enabled without specifying the correct parameters, you may not see expected results in your traffic statistics.