nginxinc / nginx-prometheus-exporter

NGINX Prometheus Exporter for NGINX and NGINX Plus
Apache License 2.0
1.54k stars 340 forks source link

Not all HTTP code are exposed #725

Closed fabiencharrasse closed 1 month ago

fabiencharrasse commented 1 month ago

Describe the bug Hello,

i'm trying to fill a grafana dashboard and it seems that only these code are exposed in promhttp_metric_handler_requests_total :

image

I've triggered other code (301/404/etc) in access.log of ngninx but none appear in exporter / prometheus / grafana. Only 200/500/503

Your environment

lucacome commented 1 month ago

Hi @fabiencharrasse

promhttp_metric_handler_requests_total is the number of times the exporter gathered the metrics from nginx and the response code it received.

I think what you're looking for is nginxplus_server_zone_responses_codes (which requires NGINX Plus).

Let me know if that makes sense.

fabiencharrasse commented 1 month ago

Thank you for the answer. Too bad, I will do without this functionality.