Skip to content
Snippets Groups Projects
Commit 5d996c70 authored by Marcia Ramos's avatar Marcia Ramos
Browse files

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
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,7 +2,7 @@
 
> [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
within the GitLab interface.
 
Loading
Loading
@@ -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 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
 
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)
* 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.
 
Loading
Loading
@@ -32,7 +36,7 @@ Once you have a connected Kubernetes cluster with Helm installed, deploying a ma
 
![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/).
 
Loading
Loading
@@ -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.
 
## Manual configuration of Prometheus
### Manual configuration of Prometheus
 
### Requirements
#### Requirements
 
Integration with Prometheus requires the following:
 
Loading
Loading
@@ -56,7 +60,7 @@ Integration with Prometheus requires the following:
1. Each metric must be have a label to indicate the environment
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.
 
Loading
Loading
@@ -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. 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.
All you will need is the DNS or IP address of the Prometheus server you'd like
Loading
Loading
@@ -83,9 +87,9 @@ to integrate with.
Once configured, GitLab will attempt to retrieve performance metrics for any
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
 
Loading
Loading
@@ -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.
> 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
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
Loading
Loading
@@ -109,7 +113,7 @@ Prometheus server.
 
## 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.
- Prometheus does not have performance data for this environment, or the metrics
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment