How to Build an Enterprise‑Grade Ingress‑Nginx Monitoring Dashboard with Prometheus & Grafana
Learn step‑by‑step how to enable metrics on ingress‑nginx, configure Prometheus to scrape those metrics, verify data collection, and add customized Grafana panels—including Harbor monitoring—to achieve a robust, enterprise‑level observability solution for Kubernetes workloads.
Why Monitoring Ingress‑Nginx Matters
In today’s fast‑paced digital transformation, enterprises rely heavily on web applications and services. Ensuring high availability and performance requires effective monitoring. Ingress‑Nginx, a popular open‑source ingress controller for Kubernetes, provides HTTP/HTTPS routing, and its enterprise‑grade monitoring panel offers real‑time traffic analysis and issue response.
1. Enable Ingress‑Nginx Metrics Port
Configure the metrics collection in the ingress‑nginx addon YAML.
<code>$ cat /etc/kubernetes/addons/ingress-nginx-value.yml
controller:
# Enable metrics collection
metrics:
enabled: true
port: 10254
</code>Apply the configuration with Helm.
<code>$ helm -n kube-system upgrade ingress-nginx -f /etc/kubernetes/addons/ingress-nginx-value.yml /etc/kubernetes/addons/ingress-nginx
# Output shows successful upgrade
</code>2. Configure Prometheus to Scrape Ingress‑Nginx Metrics
Edit the Prometheus ConfigMap to add a job for ingress‑nginx.
<code>$ kubectl -n kube-system edit cm prometheus
- job_name: 'ingress-nginx'
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_endpoints_name, __meta_kubernetes_endpoint_port_name]
action: keep
regex: kube-system;ingress-nginx-controller-metrics;metrics
</code>Verify that metrics are being collected.
<code>$ curl -s $(kubectl -n kube-system get svc prometheus -ojsonpath='{.spec.clusterIP}:{.spec.ports[0].port}')/prometheus/api/v1/query --data-urlencode 'query=up{job=~"ingress-nginx"}' | jq '.data.result[] | {job: .metric.job, instance: .metric.instance, status: .value[1]}'
{
"job": "ingress-nginx",
"instance": "10.244.85.202:10254",
"status": "1"
}
{
"job": "ingress-nginx",
"instance": "10.244.58.206:10254",
"status": "1"
}
</code>3. Add Grafana Panels (including Harbor monitoring)
Import the ingress‑nginx exporter dashboard from the GitHub repository:
https://github.com/adinhodovic/ingress-nginx-mixin/tree/main/dashboards_out
Below are screenshots of the final panels (modified for illustration).
Conclusion
Building an efficient enterprise‑grade Ingress‑Nginx monitoring system is essential for modern IT infrastructure. It improves fault‑troubleshooting, enables preventive maintenance, and delivers smoother user experiences. A well‑designed, continuously optimized monitoring panel helps teams understand application behavior, make informed decisions, and ensure business continuity.
Linux Ops Smart Journey
The operations journey never stops—pursuing excellence endlessly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.