You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/ci/environments.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -607,10 +607,9 @@ exist, you should see something like:
607
607
- With GitLab 9.2, all deployments to an environment are shown directly on the
608
608
monitoring dashboard
609
609
610
-
If you have enabled Prometheus for collecting metrics, you can monitor the performance behavior of your app
611
-
through the environments.
610
+
If you have enabled [Prometheus for monitoring system and response metrics](https://docs.gitlab.com/ee/user/project/integrations/prometheus.html), you can monitor the performance behavior of your app running in each environment.
612
611
613
-
Once configured, GitLab will attempt to retrieve performance metrics for any
612
+
Once configured, GitLab will attempt to retrieve [supported performance metrics](https://docs.gitlab.com/ee/user/project/integrations/prometheus_library/metrics.html) for any
614
613
environment which has had a successful deployment. If monitoring data was
615
614
successfully retrieved, a Monitoring button will appear on the environment's
Copy file name to clipboardExpand all lines: doc/user/project/integrations/prometheus.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Installing and configuring Prometheus to monitor applications is fairly straight
40
40
### Configuring Omnibus GitLab Prometheus to monitor Kubernetes deployments
41
41
42
42
With Omnibus GitLab running inside of Kubernetes, you can leverage the bundled
43
-
version of Prometheus to collect the supported metrics. Once enabled, Prometheus will automatically begin monitoring Kubernetes Nodes and any [annotated Pods](https://prometheus.io/docs/operating/configuration/#<kubernetes_sd_config>).
43
+
version of Prometheus to collect the supported metrics. Once enabled, Prometheus will automatically begin monitoring Kubernetes Nodes and any [annotated Pods](https://prometheus.io/docs/operating/configuration/#<kubernetes_sd_config>).
44
44
45
45
1. Read how to configure the bundled Prometheus server in the
Once configured, GitLab will attempt to retrieve performance metrics for any
134
134
environment which has had a successful deployment.
135
135
136
+
GitLab will automatically scan the Prometheus server for known metrics and attempt to identify the metrics for a particular environment. The supported metrics and scan process is detailed in our [Prometheus Metric Library documentation](prometheus_library/metrics.html).
137
+
136
138
[Learn more about monitoring environments.](../../../ci/environments.md#monitoring-environments)
137
139
138
140
## Determining the performance impact of a merge
@@ -174,7 +176,7 @@ If the "Attempting to load performance data" screen continues to appear, it coul
Copy file name to clipboardExpand all lines: doc/user/project/integrations/prometheus_library/metrics.md
+2-4
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
GitLab offers automatic detection of select [Prometheus exporters](https://prometheus.io/docs/instrumenting/exporters/). Currently supported exporters are:
5
5
*[Kubernetes](kubernetes.md)
6
6
*[NGINX](nginx.md)
7
+
*[NGINX Ingress Controller](nginx_ingress.md)
7
8
*[HAProxy](haproxy.md)
8
9
*[Amazon Cloud Watch](cloudwatch.md)
9
10
@@ -14,10 +15,7 @@ We have tried to surface the most important metrics for each exporter, and will
14
15
GitLab retrieves performance data from the configured Prometheus server, and attempts to identifying the presence of known metrics. Once identified, GitLab then needs to be able to map the data to a particular environment.
15
16
16
17
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 that,
17
-
GitLab will look for the required metrics which have a label that
18
-
matches the [$CI_ENVIRONMENT_SLUG][ci-environment-slug].
19
-
20
-
For example if you are deploying to an environment named `production`, there must be a label for the metric with the value of `production`.
18
+
GitLab uses the defined queries and fills in the environment specific variables. Typically this involves looking for the [$CI_ENVIRONMENT_SLUG](https://docs.gitlab.com/ee/ci/variables/#predefined-variables-environment-variables), but may also include other information such as the project's Kubernetes namespace. Each search query is defined in the [exporter specific documentation](#prometheus-metrics-library).
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13438) in GitLab 9.5
3
+
4
+
GitLab has support for automatically detecting and monitoring the Kubernetes NGINX ingress controller. This is provided by leveraging the built in Prometheus metrics included in [version 0.9.0](https://github.com/kubernetes/ingress/blob/master/controllers/nginx/Changelog.md#09-beta1) of the ingress.
## Configuring Prometheus to monitor for NGINX ingress metrics
15
+
16
+
The easiest way to get started is to use at least version 0.9.0 of [NGINX ingress](https://github.com/kubernetes/ingress/tree/master/controllers/nginx). If you are using NGINX as your Kubernetes ingress, there is [direct support](https://github.com/kubernetes/ingress/pull/423) for enabling Prometheus monitoring in the 0.9.0 release.
17
+
18
+
If you have deployed with the [gitlab-omnibus](https://docs.gitlab.com/ee/install/kubernetes/gitlab_omnibus.md) Helm chart, these metrics will be automatically enabled and annotated for Prometheus monitoring.
19
+
20
+
## Specifying the Environment label
21
+
22
+
In order to isolate and only display relevant metrics for a given environment
23
+
however, GitLab needs a method to detect which labels are associated. To do this, GitLab will search metrics with appropriate labels. In this case, the `upstream` label must be of the form `<Kubernetes Namespace>-<CI_ENVIRONMENT_SLUG>-*`.
24
+
25
+
If you have used [Auto Deploy](https://docs.gitlab.com/ee/ci/autodeploy/index.html) to deploy your app, this format will be used automatically and metrics will be detected with no action on your part.
0 commit comments