Closed MrMMorris closed 7 years ago
Nice to hear that 😆
You don't have to do it that way, because virtual host variable would be a label value in prometheus metrics.
Just like this:
nginx_server_requests{code="1xx",host="test.domain.com"} 0
beautiful! Thank you 😄
sorry, I guess I am still a little bit confused.
How would I set it up so that it's not a separate /status
for each server block, but instead a single "global" /status
?
So instead of this:
http {
vhost_traffic_status_zone;
...
server {
server_name blah1.com;
location /status {
vhost_traffic_status_display;
}
}
server {
server_name blah2.com;
location /status {
vhost_traffic_status_display;
}
}
server {
server_name blah3.com;
location /status {
vhost_traffic_status_display;
}
}
}
I do something like this?
http {
vhost_traffic_status_zone;
...
server {
server_name _;
location /status {
vhost_traffic_status_display;
}
}
server {
server_name blah1.com;
...
}
server {
server_name blah2.com;
...
}
server {
server_name blah3.com;
...
}
}
Absolutely right, you should try it this way 😄 You just need a global /status
hi!
Thanks for making such an awesome exporter available! I really want to utilize it, but I have a question first:
If I want to separate my metrics per virtual host/domain then would I need to run an instance/container per virtual host with differing NGINX_STATUS'?
For instance, if I have one nginx LB serving requests for a.blah.com and b.blah.com, do I have one exporter with
NGINX_STATUS=http://a.blah.com/status/format/json
and one withNGINX_STATUS=http://b.blah.com/status/format/json
?Thanks!