nginxinc/nginx-prometheus-exporter

Metrics not enough

631068264 opened this issue · 5 comments

Describe the bug
A clear and concise description of what the bug is.

To reproduce
Steps to reproduce the behavior:

use rancher/nginx-ingress-controller:nginx-1.2.0-rancher1 as nginx-ingress-controller

use nginx/nginx-prometheus-exporter:0.11.0 as controller sidecar

  - args:
    - -nginx.scrape-uri=http://127.0.0.1/nginx_status
    - ""
    image: nginx/nginx-prometheus-exporter:0.11.0
    imagePullPolicy: Always
    name: exporter
    ports:
    - containerPort: 9113
      name: prometheus
      protocol: TCP

only get metrics

# HELP nginx_connections_accepted Accepted client connections
# TYPE nginx_connections_accepted counter
nginx_connections_accepted 15934
# 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 15934
# 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
# TYPE nginx_connections_writing gauge
nginx_connections_writing 1
# HELP nginx_http_requests_total Total http requests
# TYPE nginx_http_requests_total counter
nginx_http_requests_total 15934
# HELP nginx_up Status of the last metric scrape
# TYPE nginx_up gauge
nginx_up 1
# HELP nginxexporter_build_info Exporter build information
# TYPE nginxexporter_build_info gauge
nginxexporter_build_info{arch="linux/amd64",commit="e4a6810d4f0b776f7fde37fea1d84e4c7284b72a",date="2022-09-07T21:09:51Z",dirty="false",go="go1.19",version="0.11.0"} 1

Expected behavior
A clear and concise description of what you expected to happen.

Your environment

  • Version of the Prometheus exporter - release version or a specific commit 0.11.0
  • Version of Docker/Kubernetes v1.23.6
  • [if applicable] Kubernetes platform (e.g. Mini-kube or GCP) rke
  • Using NGINX or NGINX Plus nginx

Additional context
Add any other context about the problem here. Any log files you want to share.

The metrics available from the Open Source version of NGINX are limited as mentioned in the readme.
If you want the full metrics that NGINX can bring you need to run the NGINX Plus version of the ingress controller which is this project: https://github.com/nginxinc/kubernetes-ingress

From the version of the ingress controller I believe your are running the Kubernetes Community version. Which is based on NGINX open source and requires the stub_status module.

Hi @brianehlert So if i was useing Open Source version of nginx , i can only get 9 metrics, right?

This is correct.
The open source version of NGINX has a limited set of metrics available.
This project calculates some of the metrics you are seeing and thus you technically have more than NGINX OSS by itself provides.

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

This issue was closed because it has been stalled for 10 days with no activity.