- Metrics supported
- Configuring NGINX Ingress monitoring
- Specifying the Environment label
Introduced in GitLab 11.7.
GitLab has support for automatically detecting and monitoring the Kubernetes NGINX Ingress controller. This is provided by leveraging the built-in Prometheus metrics included with Kubernetes NGINX Ingress controller version 0.16.0 onward.
Prometheus integration must be active.
|HTTP Error Rate (%)|
For other deployments, there is some configuration required depending on your installation:
- NGINX Ingress should be version 0.16.0 or above, with metrics enabled.
- NGINX Ingress should be annotated for Prometheus monitoring.
- Prometheus should be configured to monitor annotated pods.
NGINX Ingress is deployed into the
gitlab-managed-apps namespace, using the official Helm chart. NGINX Ingress is externally reachable via the Load Balancer’s Endpoint.
NGINX is configured for Prometheus monitoring, by setting:
enable-vts-status: "true", to export Prometheus metrics.
prometheus.io/scrape: "true", to enable automatic discovery.
prometheus.io/port: "10254", to specify the metrics port.
When used in conjunction with the GitLab deployed Prometheus service, response metrics are automatically collected.
Version 0.9.0 and above of NGINX Ingress have built-in support for exporting Prometheus metrics. To enable, a ConfigMap setting must be passed:
enable-vts-status: "true". Once enabled, a Prometheus metrics endpoint starts running on port 10254.
Next, the Ingress needs to be annotated for Prometheus monitoring. Two new annotations need to be added:
Managing these settings depends on how NGINX Ingress has been deployed. If you have deployed via the official Helm chart, metrics can be enabled with
controller.stats.enabled along with the required annotations. Alternatively it is possible to edit the NGINX Ingress YML directly in the Kubernetes dashboard.
In order to isolate and only display relevant metrics for a given environment, GitLab needs a method to detect which labels are associated. To do this, GitLab searches for metrics with appropriate labels. In this case, the
ingress label must
If you have used Auto Deploy to deploy your app, this format is used automatically and metrics are detected with no action on your part.