diff options
Diffstat (limited to 'doc/operations/metrics')
-rw-r--r-- | doc/operations/metrics/alerts.md | 18 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/variables.md | 9 | ||||
-rw-r--r-- | doc/operations/metrics/embed.md | 19 | ||||
-rw-r--r-- | doc/operations/metrics/img/embedded_metrics_markdown_v12_8.png | bin | 13818 -> 0 bytes | |||
-rw-r--r-- | doc/operations/metrics/img/embedded_metrics_rendered_v12_8.png | bin | 66002 -> 0 bytes | |||
-rw-r--r-- | doc/operations/metrics/img/embedded_metrics_rendered_v13_4.png | bin | 0 -> 24072 bytes | |||
-rw-r--r-- | doc/operations/metrics/index.md | 4 |
7 files changed, 37 insertions, 13 deletions
diff --git a/doc/operations/metrics/alerts.md b/doc/operations/metrics/alerts.md index 2ed8de9396a..5b880ab9746 100644 --- a/doc/operations/metrics/alerts.md +++ b/doc/operations/metrics/alerts.md @@ -6,14 +6,16 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Set up alerts for Prometheus metrics **(CORE)** +> [Moved from Ultimate to Core](https://gitlab.com/gitlab-org/gitlab/-/issues/42640) in GitLab 12.10. + After [configuring metrics for your CI/CD environment](index.md), you can set up alerting for Prometheus metrics depending on the location of your instances, and -[trigger actions from alerts](#trigger-actions-from-alerts-ultimate) to notify +[trigger actions from alerts](#trigger-actions-from-alerts) to notify your team when environment performance falls outside of the boundaries you set. ## Managed Prometheus instances -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6590) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.2 for [custom metrics](index.md#adding-custom-metrics), and GitLab 11.3 for [library metrics](../../user/project/integrations/prometheus_library/metrics.md). +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6590) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.2 for [custom metrics](index.md#adding-custom-metrics), and GitLab 11.3 for [library metrics](../../user/project/integrations/prometheus_library/metrics.md). For managed Prometheus instances using auto configuration, you can [configure alerts for metrics](index.md#adding-custom-metrics) directly in the @@ -33,7 +35,7 @@ To remove the alert, click back on the alert icon for the desired metric, and cl ### Link runbooks to alerts -> - Runbook URLs [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39315) in GitLab 13.3. +> Runbook URLs [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39315) in GitLab 13.3. When creating alerts from the metrics dashboard for [managed Prometheus instances](#managed-prometheus-instances), you can also link a runbook. When the alert triggers, the @@ -45,8 +47,8 @@ as soon as the alert fires: ## External Prometheus instances ->- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/9258) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.8. ->- [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/42640) to [GitLab Core](https://about.gitlab.com/pricing/) in 12.10. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/9258) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.8. +> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/42640) to [GitLab Core](https://about.gitlab.com/pricing/) in 12.10. For manually configured Prometheus servers, GitLab provides a notify endpoint for use with Prometheus webhooks. If you have manual configuration enabled, an @@ -78,12 +80,12 @@ Prometheus. The value of this should match the name of your environment in GitLa NOTE: **Note:** In GitLab versions 13.1 and greater, you can configure your manually configured Prometheus server to use the -[Generic alerts integration](../../user/project/integrations/generic_alerts.md). +[Generic alerts integration](../incident_management/generic_alerts.md). ## Trigger actions from alerts **(ULTIMATE)** ->- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/4925) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.11. ->- [From GitLab Ultimate 12.5](https://gitlab.com/gitlab-org/gitlab/-/issues/13401), when GitLab receives a recovery alert, it will automatically close the associated issue. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/4925) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.11. +> - [From GitLab Ultimate 12.5](https://gitlab.com/gitlab-org/gitlab/-/issues/13401), when GitLab receives a recovery alert, it will automatically close the associated issue. Alerts can be used to trigger actions, like opening an issue automatically (disabled by default since `13.1`). To configure the actions: diff --git a/doc/operations/metrics/dashboards/variables.md b/doc/operations/metrics/dashboards/variables.md index 8b0d7f37052..22c8814e8bd 100644 --- a/doc/operations/metrics/dashboards/variables.md +++ b/doc/operations/metrics/dashboards/variables.md @@ -18,6 +18,7 @@ Queries that continue to use the old format will show no data. GitLab supports a limited set of [CI variables](../../../ci/variables/README.md) in the Prometheus query. This is particularly useful for identifying a specific environment, for example with `ci_environment_slug`. The supported variables are: +- `environment_filter` - `ci_environment_slug` - `kube_namespace` - `ci_project_name` @@ -29,6 +30,14 @@ GitLab supports a limited set of [CI variables](../../../ci/variables/README.md) NOTE: **Note:** Variables for Prometheus queries must be lowercase. +### environment_filter + +`environment_filter` is automatically expanded to `container_name!="POD",environment="ENVIRONMENT_NAME"` +where `ENVIRONMENT_NAME` is the name of the current environment. + +For example, a Prometheus query like `container_memory_usage_bytes{ {{environment_filter}} }` +becomes `container_memory_usage_bytes{ container_name!="POD",environment="production" }`. + ### __range The `__range` variable is useful in Prometheus diff --git a/doc/operations/metrics/embed.md b/doc/operations/metrics/embed.md index 62d60921c85..fcf9679d164 100644 --- a/doc/operations/metrics/embed.md +++ b/doc/operations/metrics/embed.md @@ -20,15 +20,28 @@ metrics to others, and you want to have relevant information directly available. NOTE: **Note:** Requires [Kubernetes](../../user/project/integrations/prometheus_library/kubernetes.md) metrics. +Note: **Note:** +In GitLab versions 13.3 and earlier, metrics dashboard links were in the form +`https://<root_url>/<project>/-/environments/<environment_id>/metrics`. These links +are still supported, and can be used to embed metric charts. + To display metric charts, include a link of the form -`https://<root_url>/<project>/-/environments/<environment_id>/metrics` in a field +`https://<root_url>/<project>/-/metrics?environment=<environment_id>` in a field that supports GitLab-flavored Markdown: -![Embedded Metrics Markdown](img/embedded_metrics_markdown_v12_8.png) +```markdown +### Summary + +**Start time:** 2020-01-21T12:00:31+00:00 + +### Metrics + +https://gitlab.com/gitlab-org/monitor/tanuki-inc/-/metrics?environment=1118134 +``` GitLab unfurls the link as an embedded metrics panel: -![Embedded Metrics Rendered](img/embedded_metrics_rendered_v12_8.png) +![Embedded Metrics Rendered](img/embedded_metrics_rendered_v13_4.png) You can also embed a single chart. To get a link to a chart, click the **{ellipsis_v}** **More actions** menu in the upper right corner of the chart, diff --git a/doc/operations/metrics/img/embedded_metrics_markdown_v12_8.png b/doc/operations/metrics/img/embedded_metrics_markdown_v12_8.png Binary files differdeleted file mode 100644 index ffd34705464..00000000000 --- a/doc/operations/metrics/img/embedded_metrics_markdown_v12_8.png +++ /dev/null diff --git a/doc/operations/metrics/img/embedded_metrics_rendered_v12_8.png b/doc/operations/metrics/img/embedded_metrics_rendered_v12_8.png Binary files differdeleted file mode 100644 index b024daaaa8e..00000000000 --- a/doc/operations/metrics/img/embedded_metrics_rendered_v12_8.png +++ /dev/null diff --git a/doc/operations/metrics/img/embedded_metrics_rendered_v13_4.png b/doc/operations/metrics/img/embedded_metrics_rendered_v13_4.png Binary files differnew file mode 100644 index 00000000000..876972dc721 --- /dev/null +++ b/doc/operations/metrics/img/embedded_metrics_rendered_v13_4.png diff --git a/doc/operations/metrics/index.md b/doc/operations/metrics/index.md index 92c4a4986bc..742e6acef0e 100644 --- a/doc/operations/metrics/index.md +++ b/doc/operations/metrics/index.md @@ -46,7 +46,7 @@ For GitLab-managed Prometheus, you can set up [Auto DevOps](../../topics/autodev 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 +1. Ensure that, in addition to Prometheus, you also have GitLab Runner and Ingress installed. 1. After installing Ingress, copy its endpoint. 1. Navigate to your project's **Settings > CI/CD** page. In the @@ -118,7 +118,7 @@ After creating your dashboard, you can customize it to meet your needs: [create custom metrics](#adding-custom-metrics) and display them on your metrics dashboard. - **Configure alerts for metrics**: [Configure custom alerts](alerts.md) for your team when environment performance falls outside of the boundaries you set. -- **Trigger actions from alerts**: [Open new issues for your team](alerts.md#trigger-actions-from-alerts-ultimate) **(ULTIMATE)** +- **Trigger actions from alerts**: [Open new issues for your team](alerts.md#trigger-actions-from-alerts) **(ULTIMATE)** when environment performance falls outside of the boundaries you set. ## Metrics dashboard visibility |