stream-sts #
Nginx stream server traffic status module
Source: upstream source
Directives
stream_server_traffic_status #
syntax: stream_server_traffic_status on | off (on/off flag); · context: http, server, location
Description: Enables or disables the module working. If you set stream_server_traffic_status_zone directive, is automatically enabled.
stream_server_traffic_status_average_method #
syntax: stream_server_traffic_status_average_method 1 arg; · context: http, server, location
Description: Sets the method which is a formula that calculate the average of response processing times. The period is an effective time of the values used for the average calculation.(Default: 60s) If period set to 0, effective time is ignored. In this case, the last average value is displayed even if there is no requests and after the elapse of time.
stream_server_traffic_status_display #
syntax: stream_server_traffic_status_display no args; · context: server, location
Description: Enables or disables the module display handler.
stream_server_traffic_status_display_format #
syntax: stream_server_traffic_status_display_format 1 arg (enum); · context: server, location
Description: Sets the display handler's output format. If you set json, will respond with a JSON document. If you set html, will respond with the built-in live dashboard in HTML. If you set jsonp, will respond with a JSONP callback function(default: ngx_http_stream_server_traffic_status_jsonp_callback).
stream_server_traffic_status_display_jsonp #
syntax: stream_server_traffic_status_display_jsonp 1 arg (string); · context: server, location
Description: Sets the callback name for the JSONP.
stream_server_traffic_status_zone #
syntax: stream_server_traffic_status_zone no args; · context: http
Description: Sets parameters for a shared memory zone specified by server_traffic_status_zone directive in stream block. Caveats: The name must be same as specified by server_traffic_status_zone.
Example
http {
stream_server_traffic_status_zone;
...
server {
server_name example.org;
...
location /status {
stream_server_traffic_status_display;
stream_server_traffic_status_display_format html;
}
} }
}
stream {
geoip_country /usr/share/GeoIP/GeoIP.dat;
server_traffic_status_zone;
server_traffic_status_filter_by_set_key $geoip_country_code country::*;
server {
...
}
...
}