Commit 5d996c70 authored by Marcia Ramos's avatar Marcia Ramos

Merge branch 'jl-add-custom-metrics-docs' into 'master'

Improvements for prometheus metrics documentation

See merge request gitlab-org/gitlab-ce!17838
parents f12da5e3 0a5c202e
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
> [Introduced][ce-8935] in GitLab 9.0. > [Introduced][ce-8935] in GitLab 9.0.
GitLab offers powerful integration with [Prometheus] for monitoring key metrics your apps, directly within GitLab. GitLab offers powerful integration with [Prometheus] for monitoring key metrics of your apps, directly within GitLab.
Metrics for each environment are retrieved from Prometheus, and then displayed Metrics for each environment are retrieved from Prometheus, and then displayed
within the GitLab interface. within the GitLab interface.
...@@ -12,17 +12,21 @@ There are two ways to setup Prometheus integration, depending on where your apps ...@@ -12,17 +12,21 @@ There are two ways to setup Prometheus integration, depending on where your apps
* For deployments on Kubernetes, GitLab can automatically [deploy and manage Prometheus](#managed-prometheus-on-kubernetes) * For deployments on Kubernetes, GitLab can automatically [deploy and manage Prometheus](#managed-prometheus-on-kubernetes)
* For other deployment targets, simply [specify the Prometheus server](#manual-configuration-of-prometheus). * For other deployment targets, simply [specify the Prometheus server](#manual-configuration-of-prometheus).
## Managed Prometheus on Kubernetes Once enabled, GitLab will automatically detect metrics from known services in the [metric library](#monitoring-ci-cd-environments).
## Enabling Prometheus Integration
### Managed Prometheus on Kubernetes
> **Note**: [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/28916) in GitLab 10.5 > **Note**: [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/28916) in GitLab 10.5
GitLab can seamlessly deploy and manage Prometheus on a [connected Kubernetes cluster](../clusters/index.md), making monitoring of your apps easy. GitLab can seamlessly deploy and manage Prometheus on a [connected Kubernetes cluster](../clusters/index.md), making monitoring of your apps easy.
### Requirements #### Requirements
* A [connected Kubernetes cluster](../clusters/index.md) * A [connected Kubernetes cluster](../clusters/index.md)
* Helm Tiller [installed by GitLab](../clusters/index.md#installing-applications) * Helm Tiller [installed by GitLab](../clusters/index.md#installing-applications)
### Getting started #### Getting started
Once you have a connected Kubernetes cluster with Helm installed, deploying a managed Prometheus is as easy as a single click. Once you have a connected Kubernetes cluster with Helm installed, deploying a managed Prometheus is as easy as a single click.
...@@ -32,7 +36,7 @@ Once you have a connected Kubernetes cluster with Helm installed, deploying a ma ...@@ -32,7 +36,7 @@ Once you have a connected Kubernetes cluster with Helm installed, deploying a ma
![Managed Prometheus Deploy](img/prometheus_deploy.png) ![Managed Prometheus Deploy](img/prometheus_deploy.png)
### About managed Prometheus deployments #### About managed Prometheus deployments
Prometheus is deployed into the `gitlab-managed-apps` namespace, using the [official Helm chart](https://github.com/kubernetes/charts/tree/master/stable/prometheus). Prometheus is only accessible within the cluster, with GitLab communicating through the [Kubernetes API](https://kubernetes.io/docs/concepts/overview/kubernetes-api/). Prometheus is deployed into the `gitlab-managed-apps` namespace, using the [official Helm chart](https://github.com/kubernetes/charts/tree/master/stable/prometheus). Prometheus is only accessible within the cluster, with GitLab communicating through the [Kubernetes API](https://kubernetes.io/docs/concepts/overview/kubernetes-api/).
...@@ -45,9 +49,9 @@ CPU and Memory consumption is monitored, but requires [naming conventions](prome ...@@ -45,9 +49,9 @@ CPU and Memory consumption is monitored, but requires [naming conventions](prome
The [NGINX Ingress](../clusters/index.md#installing-applications) that is deployed by GitLab to clusters, is automatically annotated for monitoring providing key response metrics: latency, throughput, and error rates. The [NGINX Ingress](../clusters/index.md#installing-applications) that is deployed by GitLab to clusters, is automatically annotated for monitoring providing key response metrics: latency, throughput, and error rates.
## Manual configuration of Prometheus ### Manual configuration of Prometheus
### Requirements #### Requirements
Integration with Prometheus requires the following: Integration with Prometheus requires the following:
...@@ -56,7 +60,7 @@ Integration with Prometheus requires the following: ...@@ -56,7 +60,7 @@ Integration with Prometheus requires the following:
1. Each metric must be have a label to indicate the environment 1. Each metric must be have a label to indicate the environment
1. GitLab must have network connectivity to the Prometheus server 1. GitLab must have network connectivity to the Prometheus server
### Getting started #### Getting started
Installing and configuring Prometheus to monitor applications is fairly straight forward. Installing and configuring Prometheus to monitor applications is fairly straight forward.
...@@ -64,7 +68,7 @@ Installing and configuring Prometheus to monitor applications is fairly straight ...@@ -64,7 +68,7 @@ Installing and configuring Prometheus to monitor applications is fairly straight
1. Set up one of the [supported monitoring targets](prometheus_library/metrics.md) 1. Set up one of the [supported monitoring targets](prometheus_library/metrics.md)
1. Configure the Prometheus server to [collect their metrics](https://prometheus.io/docs/operating/configuration/#scrape_config) 1. Configure the Prometheus server to [collect their metrics](https://prometheus.io/docs/operating/configuration/#scrape_config)
### Configuration in GitLab #### Configuration in GitLab
The actual configuration of Prometheus integration within GitLab is very simple. The actual configuration of Prometheus integration within GitLab is very simple.
All you will need is the DNS or IP address of the Prometheus server you'd like All you will need is the DNS or IP address of the Prometheus server you'd like
...@@ -83,9 +87,9 @@ to integrate with. ...@@ -83,9 +87,9 @@ to integrate with.
Once configured, GitLab will attempt to retrieve performance metrics for any Once configured, GitLab will attempt to retrieve performance metrics for any
environment which has had a successful deployment. environment which has had a successful deployment.
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). GitLab will automatically scan the Prometheus server for metrics from known serves like Kubernetes and NGINX, and attempt to identify individual environment. The supported metrics and scan process is detailed in our [Prometheus Metric Library documentation](prometheus_library/metrics.html).
[Learn more about monitoring environments.](../../../ci/environments.md#monitoring-environments) You can view the performance dashboard for an environment by [clicking on the monitoring button](../../../ci/environments.md#monitoring-environments).
## Determining the performance impact of a merge ## Determining the performance impact of a merge
...@@ -93,7 +97,7 @@ GitLab will automatically scan the Prometheus server for known metrics and attem ...@@ -93,7 +97,7 @@ GitLab will automatically scan the Prometheus server for known metrics and attem
> GitLab 9.3 added the [numeric comparison](https://gitlab.com/gitlab-org/gitlab-ce/issues/27439) of the 30 minute averages. > GitLab 9.3 added the [numeric comparison](https://gitlab.com/gitlab-org/gitlab-ce/issues/27439) of the 30 minute averages.
> Requires [Kubernetes](prometheus_library/kubernetes.md) metrics > Requires [Kubernetes](prometheus_library/kubernetes.md) metrics
Developers can view theperformance impact of their changes within the merge Developers can view the performance impact of their changes within the merge
request workflow. When a source branch has been deployed to an environment, a sparkline and numeric comparison of the average memory consumption will appear. On the sparkline, a dot request workflow. When a source branch has been deployed to an environment, a sparkline and numeric comparison of the average memory consumption will appear. On the sparkline, a dot
indicates when the current changes were deployed, with up to 30 minutes of indicates when the current changes were deployed, with up to 30 minutes of
performance data displayed before and after. The comparison shows the difference between the 30 minute average before and after the deployment. This information is updated after performance data displayed before and after. The comparison shows the difference between the 30 minute average before and after the deployment. This information is updated after
...@@ -109,7 +113,7 @@ Prometheus server. ...@@ -109,7 +113,7 @@ Prometheus server.
## Troubleshooting ## Troubleshooting
If the "Attempting to load performance data" screen continues to appear, it could be due to: If the "No data found" screen continues to appear, it could be due to:
- No successful deployments have occurred to this environment. - No successful deployments have occurred to this environment.
- Prometheus does not have performance data for this environment, or the metrics - Prometheus does not have performance data for this environment, or the metrics
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment