No status code in the metrics are available from the nginx-gateway-fabric/nginx pod. #3008
-
Hello, I need some help to export metrics from nginx-gateway-fabric/nginx container to Prometheus. I have configured nginx-gateway-fabric in EKS cluster and its able to route the traffic to backend pod (using HTTPRoute). Also, able to generate metrics in path /metrics. But for some reason its not generating metrics with status code. Its able to give me the total count. Please help me configure something which can produce status_code in the metric. Available metric without status_code in grafana: I have stub_status module in the nginx.conf but its not helping. I came across below module which has everything but not sure how to install it inside a pod. Thank You! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @HarishKMedaal, The metrics for the open-source version of NGINX do not set the status_code for HTTP requests. To get the status_code you need to upgrade to our commercial version NGINX Plus. Here's the list of metrics that are exposed by NGINX Open-Source: https://github.com/nginx/nginx-prometheus-exporter?tab=readme-ov-file#metrics-for-nginx-oss Here's the list for NGINX Plus: https://github.com/nginx/nginx-prometheus-exporter?tab=readme-ov-file#metrics-for-nginx-plus |
Beta Was this translation helpful? Give feedback.
-
Hi @kate-osborn , Thank you so much for the details. |
Beta Was this translation helpful? Give feedback.
Hi @HarishKMedaal,
The metrics for the open-source version of NGINX do not set the status_code for HTTP requests. To get the status_code you need to upgrade to our commercial version NGINX Plus.
Here's the list of metrics that are exposed by NGINX Open-Source: https://github.com/nginx/nginx-prometheus-exporter?tab=readme-ov-file#metrics-for-nginx-oss
Here's the list for NGINX Plus: https://github.com/nginx/nginx-prometheus-exporter?tab=readme-ov-file#metrics-for-nginx-plus