NGINX Ingress
This integration is enabled by default.
Versions supported: > v1.9.0
This integration is out-of-the-box, so it doesn’t require any exporter.
This integration has 45 metrics.
Timeseries generated: 1500
This integration specifically supports kubernetes/ingress-nginx, and not other NGINX-Ingress versions like nginxinc/kubernetes-ingress.
List of Alerts
Alert | Description | Format |
---|---|---|
[Nginx-Ingress] High Http 4xx Error Rate | Too many HTTP requests with status 4xx (> 5%) | Prometheus |
[Nginx-Ingress] High Http 5xx Error Rate | Too many HTTP requests with status 5xx (> 5%) | Prometheus |
[Nginx-Ingress] High Latency | Nginx p99 latency is higher than 10 seconds | Prometheus |
[Nginx-Ingress] Ingress Certificate Expiry | Nginx Ingress Certificate will expire in less than 14 days | Prometheus |
List of Dashboards
Nginx Ingress
The dashboard provides information on the error rate, resource usage, traffic and certificate expiration of the NGINX ingress.
List of Metrics
Metric name |
---|
go_build_info |
go_gc_duration_seconds |
go_gc_duration_seconds_count |
go_gc_duration_seconds_sum |
go_goroutines |
go_info |
go_memstats_buck_hash_sys_bytes |
go_memstats_gc_sys_bytes |
go_memstats_heap_alloc_bytes |
go_memstats_heap_idle_bytes |
go_memstats_heap_inuse_bytes |
go_memstats_heap_released_bytes |
go_memstats_heap_sys_bytes |
go_memstats_lookups_total |
go_memstats_mallocs_total |
go_memstats_mcache_inuse_bytes |
go_memstats_mcache_sys_bytes |
go_memstats_mspan_inuse_bytes |
go_memstats_mspan_sys_bytes |
go_memstats_next_gc_bytes |
go_memstats_stack_inuse_bytes |
go_memstats_stack_sys_bytes |
go_memstats_sys_bytes |
go_threads |
nginx_ingress_controller_config_last_reload_successful |
nginx_ingress_controller_config_last_reload_successful_timestamp_seconds |
nginx_ingress_controller_connect_duration_seconds_count |
nginx_ingress_controller_connect_duration_seconds_sum |
nginx_ingress_controller_ingress_upstream_latency_seconds_count |
nginx_ingress_controller_ingress_upstream_latency_seconds_sum |
nginx_ingress_controller_nginx_process_connections |
nginx_ingress_controller_nginx_process_cpu_seconds_total |
nginx_ingress_controller_nginx_process_resident_memory_bytes |
nginx_ingress_controller_request_duration_seconds_bucket |
nginx_ingress_controller_request_duration_seconds_count |
nginx_ingress_controller_request_duration_seconds_sum |
nginx_ingress_controller_request_size_sum |
nginx_ingress_controller_requests |
nginx_ingress_controller_response_duration_seconds_count |
nginx_ingress_controller_response_duration_seconds_sum |
nginx_ingress_controller_response_size_sum |
nginx_ingress_controller_ssl_expire_time_seconds |
process_cpu_seconds_total |
process_max_fds |
process_open_fds |
Prerequisites
Enable NGINX Ingress metrics
To enable metric scraping, you should add the following line to the NGINX Ingress configuration file:
controller.metrics.enabled=true
This parameter should be added in the NGINX Ingress section of the values.yaml file if you’re using Helm to deploy the NGINX Ingress, or in the nginx-ingress-controller configuration file if you’re using a native Kubernetes installation.
Once you’ve enabled metric scraping with this parameter, the NGINX Ingress will automatically begin exposing its metrics on port 10254.
Another option is adding the following line to the NGINX Ingress configuration file:
controller.metrics.podAnnotations.prometheus.io/scrape=true
Installation
Installing an exporter is not required for this integration.
Agent Configuration
The default agent job for this integration is as follows:
- job_name: nginx-ingress-default
tls_config:
insecure_skip_verify: true
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
source_labels: [__meta_kubernetes_pod_host_ip]
regex: __HOSTIPS__
- action: keep
source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
regex: true
- action: drop
source_labels: [__meta_kubernetes_pod_annotation_promcat_sysdig_com_omit]
regex: true
- source_labels: [__meta_kubernetes_pod_phase]
action: keep
regex: Running
- action: replace
source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
target_label: __scheme__
regex: (https?)
- action: replace
source_labels:
- __meta_kubernetes_pod_container_name
- __meta_kubernetes_pod_annotation_promcat_sysdig_com_integration_type
regex: (controller|nginx-ingress-controller);(.{0}$)
replacement: nginx-ingress
target_label: __meta_kubernetes_pod_annotation_promcat_sysdig_com_integration_type
- action: keep
source_labels:
- __meta_kubernetes_pod_annotation_promcat_sysdig_com_integration_type
regex: "nginx-ingress"
- action: replace
source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
target_label: __address__
- action: replace
source_labels: [__meta_kubernetes_pod_uid]
target_label: sysdig_k8s_pod_uid
- action: replace
source_labels: [__meta_kubernetes_pod_container_name]
target_label: sysdig_k8s_pod_container_name
metric_relabel_configs:
- source_labels: [__name__]
regex: (go_build_info|go_info|nginx_ingress_controller_config_last_reload_successful|nginx_ingress_controller_config_last_reload_successful_timestamp_seconds|nginx_ingress_controller_ingress_upstream_latency_seconds_count|nginx_ingress_controller_ingress_upstream_latency_seconds_sum|nginx_ingress_controller_connect_duration_seconds_sum|nginx_ingress_controller_connect_duration_seconds_count|nginx_ingress_controller_nginx_process_connections|nginx_ingress_controller_nginx_process_cpu_seconds_total|process_max_fds|process_open_fds|nginx_ingress_controller_nginx_process_resident_memory_bytes|nginx_ingress_controller_request_duration_seconds_bucket|nginx_ingress_controller_request_duration_seconds_count|nginx_ingress_controller_request_duration_seconds_sum|nginx_ingress_controller_request_size_sum|nginx_ingress_controller_requests|nginx_ingress_controller_response_duration_seconds_count|nginx_ingress_controller_response_duration_seconds_sum|nginx_ingress_controller_response_size_sum|nginx_ingress_controller_ssl_expire_time_seconds|go_gc_duration_seconds|go_gc_duration_seconds_count|go_gc_duration_seconds_sum|go_goroutines|go_memstats_buck_hash_sys_bytes|go_memstats_gc_sys_bytes|go_memstats_heap_alloc_bytes|go_memstats_heap_idle_bytes|go_memstats_heap_inuse_bytes|go_memstats_heap_released_bytes|go_memstats_heap_sys_bytes|go_memstats_lookups_total|go_memstats_mallocs_total|go_memstats_mcache_inuse_bytes|go_memstats_mcache_sys_bytes|go_memstats_mspan_inuse_bytes|go_memstats_mspan_sys_bytes|go_memstats_next_gc_bytes|go_memstats_stack_inuse_bytes|go_memstats_stack_sys_bytes|go_memstats_sys_bytes|go_threads)
action: keep
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.