Closed dk900912 closed 6 years ago
Sounds useful, I would add these metrics like uptime, version and so on... :-)
And yes, you missed some metrics like upstreamZones
Hi @hnlq715,
I agree with @dk900912, could you please add;
Without these I can't create alarms to check if Nginx container is running and/or has spontaneously rebooted.
Cheers!
👍 same here, I also can't create alarms to check if Nginx container is running and/or has spontaneously rebooted.
Server info metrics added, and readme docs updated, please check the latest docker image.
@hnlq715 We are not able to plot the graph for the nginx uptime value as it is not the metric output but it is inside the tag. Is it possible for you expose the nginx uptime value as a separate metric?
Refer to this link http://docs.grafana.org/features/datasources/prometheus/
You could get label value through label_values(metric, label)
@hnlq715 that is only possible in templating and that value does not update automatically.
label_values(metric, label)
this we can not use for metrics query.
Alright, what about this?
nginx_server_info{hostName="localhost", nginxVersion="1.11.1"} 100
the value 100
is nginx's uptime
yes if this is possible then it will be really helpful. But currently it is not.
@bsushant-athena please try the latest release.
@hnlq715 can you please provide the binary file for the latest release?
@hnlq715 that worked but the problem I see is that , if I put this metric in singlestat graph then it only shows the seconds ; ideally it should be like 60 seconds 60 minutes 24 hours then days and so on. is it possible to add these changes as well ? 🙏
This should be done in grafana I think? Prometheus can not store string metrics.
Hi, hnlq715. Nginx has many metrics, but i only get 3 useful metrics :nginx_server_bytes、nginx_server_cache、nginx_server_connections. Is there some metrics i missed ? like nginx_uptime