sysulq/nginx-vts-exporter

`nginx_filter_xxx` metrics are missing in `prometheus` graph console

Closed this issue · 3 comments

ouadi commented

I have:

  • activated nginx_module_vts (see config below)
  • configured and started nginx_vts_exporter
  • configured prometheus to scrape metrics from nginx_vts_exporter

I'm able to see nginx_server_xxx and nginx_upstream_xxx metrics in prometheus graph console. However, I can't see nginx_filter_xxx metrics.

Also, filterZones property is present with full data in response to /status/format/json.

What I'm missing to get nginx_filter_xxx metrics in prometheus?

Below is the config of nginx_module_vts:

http {
  vhost_traffic_status_zone;
  vhost_traffic_status_filter_by_set_key $uri uri::$server_name;
  ...
}

location /status {
  vhost_traffic_status_display;
  vhost_traffic_status_display_format json;
}

Example of /status/format/json output:

{
	"hostName": "ctrl.localdomain",
	...
	"connections": {
		"active": 4,
		...
	},
	"sharedZones": {
		"name": "ngx_http_vhost_traffic_status",
		...
	},
	"serverZones": {
		"nginx-vts.localhost": {
			"requestCounter": 5,
			...
		},
		"php-fpm.localhost": {
			"requestCounter": 6,
			...
		},
		...
		"*": {
			"requestCounter": 18,
			...
		}
	},
	"filterZones": {
		"uri::nginx-vts.localhost": {
			"/status/format/json": {
				"requestCounter": 5,
				...
			}
		},
		"uri::php-fpm.localhost": {
			"/status": {
				"requestCounter": 6,
				...
			}
		},
		...
	},
	"upstreamZones": {
		"::nogroups": [{
			"server": "127.0.0.1:9000",
			"requestCounter": 6,
			...
			"inBytes": 624,
		}, {
			"server": "127.0.0.1:49090",
			"requestCounter": 7,
			...
		}]
	}
}

Filter zones don't work in the latest release, 0.6; if you build from the master branch, filter zones work.

ouadi commented

Thank you for the info. I will check and update the issue's status accordingly.

ouadi commented

I confirm, version 0.7, released 10 days ago (Nov 10th, 2017) filter zones work. Issue closed.