Lewati ke isi

nginx node exporter

NGINX Prometheus exporter makes it possible to monitor NGINX or NGINX Plus using Prometheus. NGINX exposes a handful of metrics via the stub_status page. NGINX Plus provides a richer set of metrics via the API and the monitoring dashboard. NGINX Prometheus exporter fetches the metrics from a single NGINX or NGINX Plus, converts the metrics into appropriate Prometheus metrics types and finally exposes them via an HTTP server to be collected by Prometheus.

/etc/nginx/site-enable/docs.agungsurya.my.id
server {
    location /nginx_status {
        stub_status;

        access_log off;
        allow 127.0.0.1;
        deny all;
    }
}
curl localhost/nginx_status
Active connections: 1
server accepts handled requests
 2212 2212 1314
Reading: 0 Writing: 1 Waiting: 0
nginx-prometheus-exporter -nginx.scrape-uri=http://localhost/nginx_status
  - job_name: nginx exporter
    scrape_interval: 5s
    static_configs:
    - targets:
      - localhost:9113
systct restart prometheus

cek web prometeus target nama nginx exporter

sambungkan dengan gradfana

https://grafana.com/grafana/dashboards/12708-nginx/