Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/operations/metrics/index.md')
-rw-r--r--doc/operations/metrics/index.md113
1 files changed, 77 insertions, 36 deletions
diff --git a/doc/operations/metrics/index.md b/doc/operations/metrics/index.md
index 12088884f44..92c4a4986bc 100644
--- a/doc/operations/metrics/index.md
+++ b/doc/operations/metrics/index.md
@@ -4,7 +4,64 @@ group: APM
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
---
-# Monitor metrics for your CI/CD environment
+# Monitor your CI/CD environment's metrics **(CORE)**
+
+GitLab helps your team monitor the health and performance of your applications
+and infrastructure by turning statistics and log files into charts and graphs
+that are easy to understand, especially when time is short and decisions are
+critical. For GitLab to display your information in charts, you must:
+
+1. **Instrument your application** - Collect accurate and complete measurements.
+ <I class="fa fa-youtube-play youtube" aria-hidden="true"></I>
+ For an overview, see [How to instrument Prometheus metrics in GitLab](https://www.youtube.com/watch?v=tuI2oJ3TTB4).
+1. **Expose metrics for capture** - Make logs, metrics, and traces available for capture.
+1. [**Configure Prometheus to gather metrics**](#configure-prometheus-to-gather-metrics) -
+ Deploy managed applications like Elasticsearch, Prometheus, and Jaeger to gather
+ the data you've exposed.
+1. **GitLab collects metrics** - GitLab uses Prometheus to scrape the data you've
+ captured in your managed apps, and prepares the data for display. To learn more, read
+ [Collect and process metrics](#collect-and-process-metrics).
+1. **Display charts in the GitLab user interface** - GitLab converts your metrics
+ into easy-to-read charts on a default dashboard. You can create as many custom charts
+ and custom dashboards as needed so your team has full insight into your
+ application's health.
+
+## Configure Prometheus to gather metrics
+
+You must connect a Prometheus instance to GitLab to collect metrics. How you configure
+your Prometheus integration depends on where your apps are running:
+
+- **For manually-configured Prometheus** -
+ [Specify your Prometheus server](../../user/project/integrations/prometheus.md#manual-configuration-of-prometheus),
+ and define at least one environment.
+- **For GitLab-managed Prometheus** - GitLab can
+ [deploy and manage Prometheus](../../user/project/integrations/prometheus.md#managed-prometheus-on-kubernetes) for you.
+ You must also complete a code deployment, as described in
+ [Deploy code with GitLab-managed Prometheus](#deploy-code-with-gitlab-managed-prometheus),
+ for the **Operations > Metrics** page to contain data.
+
+### Deploy code with GitLab-managed Prometheus
+
+For GitLab-managed Prometheus, you can set up [Auto DevOps](../../topics/autodevops/index.md)
+to quickly create a deployment:
+
+1. Navigate to your project's **Operations > Kubernetes** page.
+1. Ensure that, in addition to Prometheus, you also have Runner and Ingress
+ installed.
+1. After installing Ingress, copy its endpoint.
+1. Navigate to your project's **Settings > CI/CD** page. In the
+ **Auto DevOps** section, select a deployment strategy and save your changes.
+1. On the same page, in the **Variables** section, add a variable named
+ `KUBE_INGRESS_BASE_DOMAIN` with the value of the Ingress endpoint you
+ copied previously. Leave the type as **Variable**.
+1. Navigate to your project's **{rocket}** **CI/CD > Pipelines** page, and run a
+ pipeline on any branch.
+1. When the pipeline has run successfully, graphs are available on the
+ **Operations > Metrics** page.
+
+![Monitoring Dashboard](img/prometheus_monitoring_dashboard_v13_3.png)
+
+## Collect and process metrics
After [configuring Prometheus for a cluster](../../user/project/integrations/prometheus.md),
GitLab attempts to retrieve performance metrics for any [environment](../../ci/environments/index.md) with
@@ -15,17 +72,17 @@ and NGINX, and attempts to identify individual environments. To learn more about
the supported metrics and scan processes, see the
[Prometheus Metrics Library documentation](../../user/project/integrations/prometheus_library/index.md).
-To view the metrics dashboard for an environment that has
-[completed at least one deployment](#populate-your-metrics-dashboard):
+To view the [default metrics dashboard](dashboards/default.md) for an environment that is
+[configured to gather metrics](#configure-prometheus-to-gather-metrics):
1. *If the metrics dashboard is only visible to project members,* sign in to
GitLab as a member of a project. Learn more about [metrics dashboard visibility](#metrics-dashboard-visibility).
-1. In your project, navigate to **{cloud-gear}** **Operations > Metrics**.
+1. In your project, navigate to **Operations > Metrics**.
-GitLab displays the default metrics dashboard for the environment, like the
-following example:
+GitLab displays the [default metrics dashboard](dashboards/default.md) for the environment,
+like the following example:
-![Example of metrics dashboard](img/example-dashboard_v13_1.png)
+![Example of metrics dashboard](img/example-dashboard_v13_3.png)
The top of the dashboard contains a navigation bar. From left to right, the
navigation bar contains:
@@ -37,38 +94,22 @@ navigation bar contains:
- **Range** - The time period of data to display.
- **Refresh dashboard** **{retry}** - Reload the dashboard with current data.
- **Set refresh rate** - Set a time frame for refreshing the data displayed.
-- **Star dashboard** **{star-o}** - Click to mark a dashboard as a favorite.
+- **More actions** **{ellipsis_v}** - More dashboard actions
+ - **Add metric** - Adds a [custom metric](#adding-custom-metrics). Only available on GitLab-defined dashboards.
+ ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/34779) in GitLab 12.5.)
+ - **Edit dashboard YAML** - Edit the source YAML file of a custom dashboard. Only available on
+ [custom dashboards](dashboards/index.md).
+ ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/34779) in GitLab 12.5.)
+ - **Duplicate current dashboard** - Save a [complete copy of a dashboard](dashboards/index.md#duplicate-a-gitlab-defined-dashboard). Only available on GitLab-defined dashboards.
+ - **Star dashboard** **{star-o}** - Click to mark a dashboard as a favorite.
Starred dashboards display a solid star **{star}** button, and display first
in the **Dashboard** dropdown list.
([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214582) in GitLab 13.0.)
-- **Create dashboard** **{file-addition-solid}** - Create a
- [new custom dashboard for your project](dashboards/index.md#adding-a-new-dashboard-to-your-project).
-- **Metrics settings** **{settings}** - Configure the
+ - **Create new dashboard** - Create a [new custom dashboard for your project](dashboards/index.md#add-a-new-dashboard-to-your-project).
+ ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/228856) in GitLab 13.3.)
+- **Metrics settings** - Configure the
[settings for this dashboard](dashboards/index.md#manage-the-metrics-dashboard-settings).
-## Populate your metrics dashboard
-
-After [configuring Prometheus for a cluster](../../user/project/integrations/prometheus.md),
-you must also deploy code for the **{cloud-gear}** **Operations > Metrics** page
-to contain data. Setting up [Auto DevOps](../../topics/autodevops/index.md)
-helps quickly create a deployment:
-
-1. Navigate to your project's **{cloud-gear}** **Operations > Kubernetes** page.
-1. Ensure that, in addition to Prometheus, you also have Runner and Ingress
- installed.
-1. After installing Ingress, copy its endpoint.
-1. Navigate to your project's **{settings}** **Settings > CI/CD** page. In the
- **Auto DevOps** section, select a deployment strategy and save your changes.
-1. On the same page, in the **Variables** section, add a variable named
- `KUBE_INGRESS_BASE_DOMAIN` with the value of the Ingress endpoint you
- copied previously. Leave the type as **Variable**.
-1. Navigate to your project's **{rocket}** **CI/CD > Pipelines** page, and run a
- pipeline on any branch.
-1. When the pipeline has run successfully, graphs are available on the
- **{cloud-gear}** **Operations > Metrics** page.
-
-![Monitoring Dashboard](../../user/project/integrations/img/prometheus_monitoring_dashboard_v13_1.png)
-
## Customize your metrics dashboard
After creating your dashboard, you can customize it to meet your needs:
@@ -101,7 +142,7 @@ After saving them, they display on the environment metrics dashboard provided th
[Prometheus installed on the cluster](../../user/project/integrations/prometheus.md#enabling-prometheus-integration).
- Prometheus is [manually configured](../../user/project/integrations/prometheus.md#manual-configuration-of-prometheus).
-![Add New Metric](../../user/project/integrations/img/prometheus_add_metric.png)
+![Add New Metric](img/prometheus_add_metric.png)
A few fields are required:
@@ -124,7 +165,7 @@ suggested if this feature is used.
You can edit existing additional custom metrics for your dashboard by clicking the
**{ellipsis_v}** **More actions** dropdown and selecting **Edit metric**.
-![Edit metric](../../user/project/integrations/img/prometheus_dashboard_edit_metric_link_v_12_9.png)
+![Edit metric](img/prometheus_dashboard_edit_metric_link_v_12_9.png)
## Keyboard shortcuts for charts