nginx-prometheus-exporter
nginx-prometheus-exporter copied to clipboard
With Prometheus,i got a metric named "nginx_connections_accepted_total",not "nginx_connections_accepted"
Describe the bug Hello,i am considering is it a bug? With Prometheus,i got a metric named "nginx_connections_accepted_total",not "nginx_connections_accepted". In source code,example dashboard(grafana/dashboard.json),README.md ,it is "nginx_connections_accepted".
To reproduce When i run "curl http://127.0.0.1:9113/metrics",i can get expect result.
# HELP nginx_connections_accepted Accepted client connections
# TYPE nginx_connections_accepted counter
nginx_connections_accepted 23
# HELP nginx_connections_active Active client connections
# TYPE nginx_connections_active gauge
nginx_connections_active 1
# HELP nginx_connections_handled Handled client connections
# TYPE nginx_connections_handled counter
nginx_connections_handled 23
# HELP nginx_connections_reading Connections where NGINX is reading the request header
# TYPE nginx_connections_reading gauge
nginx_connections_reading 0
# HELP nginx_connections_waiting Idle client connections
# TYPE nginx_connections_waiting gauge
nginx_connections_waiting 0
# HELP nginx_connections_writing Connections where NGINX is writing the response back to the client
And when i query other metrics,like nginx_connections_handled_total with PromSQL in Grafana ,i can get the right result.
So i think i deployed in right way.
But when i query metric nginx_connections_accepted with PromSQL in Grafana,i can only find a metric named "nginx_connections_accepted_total",instead of "nginx_connections_accepted".
Expected behavior
When i query with PromSQL in Grafana,the metric name is "nginx_connections_accepted".
Your environment
- nginx-prometheus-exporter v1.1.0
- nginx v1.23.0
- Grafana v10.0.0
- prometheus v2.45.0
Additional context Add any other context about the problem here. Any log files you want to share.
Hi @T-L-T! Welcome to the project! 🎉
Thanks for opening this issue! Be sure to check out our Contributing Guidelines and the Issue Lifecycle while you wait for someone on the team to take a look at this.
Hi @T-L-T
Do you have a screenshot? I can't reproduce it, I see nginx_connections_accepted in both Graphana and Prometheus.
Hi @T-L-T
Do you have a screenshot? I can't reproduce it, I see
nginx_connections_acceptedin both Graphana and Prometheus.
Thank you for your attention. This is my screenshot.
Hi @T-L-T
Do you have a screenshot? I can't reproduce it, I see
nginx_connections_acceptedin both Graphana and Prometheus.
Thank you for your attention again,I think i find the reason for that. The "collector" handle that,like "_total","_sum" and so on.
@T-L-T how did you fix it? I am having the same issue.
@T-L-T how did you fix it? I am having the same issue.
For me,because of the mimir. Mimir will aggregate the metrics and change the metric name before store them in the prometheus database.