diff options
Diffstat (limited to 'doc/operations/metrics')
-rw-r--r-- | doc/operations/metrics/alerts.md | 8 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/default.md | 3 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/develop.md | 2 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/img/metrics_dashboard_panel_preview_v13_3.png | bin | 67972 -> 45857 bytes | |||
-rw-r--r-- | doc/operations/metrics/dashboards/index.md | 21 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/panel_types.md | 72 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/settings.md | 2 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/templating_variables.md | 2 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/variables.md | 10 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/yaml.md | 16 | ||||
-rw-r--r-- | doc/operations/metrics/dashboards/yaml_number_format.md | 2 | ||||
-rw-r--r-- | doc/operations/metrics/embed.md | 5 | ||||
-rw-r--r-- | doc/operations/metrics/embed_grafana.md | 11 | ||||
-rw-r--r-- | doc/operations/metrics/index.md | 2 |
14 files changed, 73 insertions, 83 deletions
diff --git a/doc/operations/metrics/alerts.md b/doc/operations/metrics/alerts.md index 5b880ab9746..79e3bdbd69c 100644 --- a/doc/operations/metrics/alerts.md +++ b/doc/operations/metrics/alerts.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- @@ -15,7 +15,7 @@ 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/index.md). For managed Prometheus instances using auto configuration, you can [configure alerts for metrics](index.md#adding-custom-metrics) directly in the @@ -70,14 +70,14 @@ receivers: bearer_token: 9e1cbfcd546896a9ea8be557caf13a76 send_resolved: true url: http://192.168.178.31:3001/root/manual_prometheus/prometheus/alerts/notify.json - ... + # Rest of configuration omitted + # ... ``` For GitLab to associate your alerts with an [environment](../../ci/environments/index.md), you must configure a `gitlab_environment_name` label on the alerts you set up in Prometheus. The value of this should match the name of your environment in GitLab. -NOTE: **Note:** In GitLab versions 13.1 and greater, you can configure your manually configured Prometheus server to use the [Generic alerts integration](../incident_management/generic_alerts.md). diff --git a/doc/operations/metrics/dashboards/default.md b/doc/operations/metrics/dashboards/default.md index f086d7737bd..11e96114f38 100644 --- a/doc/operations/metrics/dashboards/default.md +++ b/doc/operations/metrics/dashboards/default.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- @@ -25,7 +25,6 @@ metrics about the [deployed application](../index.md#configure-prometheus-to-gat ## Kubernetes pod health dashboard -NOTE: **Note:** This dashboard requires Kubernetes v1.14 or higher, due to the [change in metric labels](https://github.com/kubernetes/kubernetes/pull/69099) in Kubernetes 1.14. diff --git a/doc/operations/metrics/dashboards/develop.md b/doc/operations/metrics/dashboards/develop.md index b621f5fd727..9254bfe075f 100644 --- a/doc/operations/metrics/dashboards/develop.md +++ b/doc/operations/metrics/dashboards/develop.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- diff --git a/doc/operations/metrics/dashboards/img/metrics_dashboard_panel_preview_v13_3.png b/doc/operations/metrics/dashboards/img/metrics_dashboard_panel_preview_v13_3.png Binary files differindex 4f6d3b3dfa4..3c3203265e1 100644 --- a/doc/operations/metrics/dashboards/img/metrics_dashboard_panel_preview_v13_3.png +++ b/doc/operations/metrics/dashboards/img/metrics_dashboard_panel_preview_v13_3.png diff --git a/doc/operations/metrics/dashboards/index.md b/doc/operations/metrics/dashboards/index.md index ffcb7dc92c6..4aa340a9e59 100644 --- a/doc/operations/metrics/dashboards/index.md +++ b/doc/operations/metrics/dashboards/index.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- @@ -14,7 +14,6 @@ includes a few key metrics, but you can also define your own custom dashboards. You may create a [new dashboard from scratch](#add-a-new-dashboard-to-your-project) or [duplicate a GitLab-defined Prometheus dashboard](#duplicate-a-gitlab-defined-dashboard). -NOTE: **Note:** The metrics as defined below do not support alerts, unlike [custom metrics](../index.md#adding-custom-metrics). @@ -51,16 +50,16 @@ To create a new dashboard from the command line: - group: 'Group Title' panels: - type: area-chart - title: "Chart Title" - y_label: "Y-Axis" + title: 'Chart Title' + y_label: 'Y-Axis' y_axis: format: number precision: 0 metrics: - id: my_metric_id query_range: 'http_requests_total' - label: "Instance: {{instance}}, method: {{method}}" - unit: "count" + label: 'Instance: {{instance}}, method: {{method}}' + unit: 'count' ``` 1. Save the file, commit, and push to your repository. The file must be present in your **default** branch. @@ -86,7 +85,7 @@ with the **Add Panel** page: 1. Click **Add panel** in the **{ellipsis_v}** **More actions** menu. NOTE: **Note:** - You can add panel only to custom dashboards. + You can only add panels to custom dashboards. ![Monitoring Dashboard actions menu with add panel item](img/actions_menu_create_add_panel_v13_3.png) 1. In the **Define and preview panel** section, paste in the YAML you want to @@ -100,16 +99,12 @@ with the **Add Panel** page: > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/37238) in GitLab 12.7. > - From [GitLab 12.8 onwards](https://gitlab.com/gitlab-org/gitlab/-/issues/39505), custom metrics are also duplicated when you duplicate a dashboard. -You can save a complete copy of a GitLab defined dashboard along with all custom metrics added to it. +You can save a complete copy of a GitLab-defined dashboard along with all custom metrics added to it. The resulting `.yml` file can be customized and adapted to your project. You can decide to save the dashboard `.yml` file in the project's **default** branch or in a -new branch. +new branch. To duplicate a GitLab-defined dashboard: 1. Click **Duplicate current dashboard** in the **{ellipsis_v}** **More actions** menu. - - NOTE: **Note:** - You can duplicate only GitLab-defined dashboards. - 1. Enter the filename and other information, such as the new commit's message, and click **Duplicate**. 1. Select a branch to add your dashboard to: - *If you select your **default** branch,* the new dashboard becomes immediately available. diff --git a/doc/operations/metrics/dashboards/panel_types.md b/doc/operations/metrics/dashboards/panel_types.md index b2cbdcb88d9..fd9d2bf7899 100644 --- a/doc/operations/metrics/dashboards/panel_types.md +++ b/doc/operations/metrics/dashboards/panel_types.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- @@ -17,16 +17,16 @@ dashboard: 'Dashboard Title' panel_groups: - group: 'Group Title' panels: - - type: area-chart # or line-chart + - type: area-chart # or line-chart title: 'Area Chart Title' - y_label: "Y-Axis" + y_label: 'Y-Axis' y_axis: format: number precision: 0 metrics: - id: area_http_requests_total query_range: 'http_requests_total' - label: "Instance: {{instance}}, Method: {{method}}" + label: 'Instance: {{instance}}, Method: {{method}}' unit: "count" ``` @@ -55,23 +55,23 @@ panel_groups: - group: 'Group Title' panels: - type: anomaly-chart - title: "Chart Title" + title: 'Chart Title' y_label: "Y-Axis" metrics: - id: anomaly_requests_normal query_range: 'http_requests_total' - label: "# of Requests" - unit: "count" + label: '# of Requests' + unit: 'count' metrics: - id: anomaly_requests_upper_limit query_range: 10000 - label: "Max # of requests" - unit: "count" + label: 'Max # of requests' + unit: 'count' metrics: - id: anomaly_requests_lower_limit query_range: 2000 - label: "Min # of requests" - unit: "count" + label: 'Min # of requests' + unit: 'count' ``` Note the following properties: @@ -93,13 +93,13 @@ panel_groups: - group: 'Group title' panels: - type: bar - title: "Http Handlers" + title: 'HTTP Handlers' x_label: 'Response Size' y_axis: - name: "Handlers" + name: 'Handlers' metrics: - id: prometheus_http_response_size_bytes_bucket - query_range: "sum(increase(prometheus_http_response_size_bytes_bucket[1d])) by (handler)" + query_range: 'sum(increase(prometheus_http_response_size_bytes_bucket[1d])) by (handler)' unit: 'Bytes' ``` @@ -121,13 +121,13 @@ dashboard: 'Dashboard Title' panel_groups: - group: 'Group title' panels: - - title: "Column" - type: "column" + - title: 'Column' + type: 'column' metrics: - id: 1024_memory query: 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024' unit: MB - label: "Memory Usage" + label: 'Memory Usage' ``` Note the following properties: @@ -153,19 +153,19 @@ panel_groups: priority: 5 panels: - type: 'stacked-column' - title: "Stacked column" - y_label: "y label" + title: 'Stacked column' + y_label: 'y label' x_label: 'x label' metrics: - id: memory_1 query_range: 'memory_query' - label: "memory query 1" - unit: "count" + label: 'memory query 1' + unit: 'count' series_name: 'group 1' - id: memory_2 query_range: 'memory_query_2' - label: "memory query 2" - unit: "count" + label: 'memory query 2' + unit: 'count' series_name: 'group 2' ``` @@ -185,13 +185,13 @@ dashboard: 'Dashboard Title' panel_groups: - group: 'Group Title' panels: - - title: "Single Stat" - type: "single-stat" + - title: 'Single Stat' + type: 'single-stat' metrics: - id: 10 query: 'max(go_memstats_alloc_bytes{job="prometheus"})' unit: MB - label: "Total" + label: 'Total' ``` Note the following properties: @@ -215,14 +215,14 @@ dashboard: 'Dashboard Title' panel_groups: - group: 'Group Title' panels: - - title: "Single Stat" - type: "single-stat" + - title: 'Single Stat' + type: 'single-stat' max_value: 100 metrics: - id: 10 query: 'max(go_memstats_alloc_bytes{job="prometheus"})' unit: '%' - label: "Total" + label: 'Total' ``` For example, if you have a query value of `53.6`, adding `%` as the unit results in a single stat value of `53.6%`, but if the maximum expected value of the query is `120`, the value would be `44.6%`. Adding the `max_value` causes the correct percentage value to display. @@ -242,15 +242,15 @@ dashboard: 'Dashboard Title' panel_groups: - group: 'Group Title' panels: - - title: "Gauge" - type: "gauge" + - title: 'Gauge' + type: 'gauge' min_value: 0 max_value: 1000 split: 5 thresholds: values: [60, 90] - mode: "percentage" - format: "kilobytes" + mode: 'percentage' + format: 'kilobytes' metrics: - id: 10 query: 'floor(max(prometheus_http_response_size_bytes_bucket)/1000)' @@ -289,13 +289,13 @@ dashboard: 'Dashboard Title' panel_groups: - group: 'Group Title' panels: - - title: "Heatmap" - type: "heatmap" + - title: 'Heatmap' + type: 'heatmap' metrics: - id: 10 query: 'sum(rate(nginx_upstream_responses_total{upstream=~"%{kube_namespace}-%{ci_environment_slug}-.*"}[60m])) by (status_code)' unit: req/sec - label: "Status code" + label: 'Status code' ``` Note the following properties: diff --git a/doc/operations/metrics/dashboards/settings.md b/doc/operations/metrics/dashboards/settings.md index a4aef6b1674..aa0b9a81771 100644 --- a/doc/operations/metrics/dashboards/settings.md +++ b/doc/operations/metrics/dashboards/settings.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- diff --git a/doc/operations/metrics/dashboards/templating_variables.md b/doc/operations/metrics/dashboards/templating_variables.md index 71025d41281..1c0b05b0e53 100644 --- a/doc/operations/metrics/dashboards/templating_variables.md +++ b/doc/operations/metrics/dashboards/templating_variables.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- diff --git a/doc/operations/metrics/dashboards/variables.md b/doc/operations/metrics/dashboards/variables.md index 22c8814e8bd..2103f8e66db 100644 --- a/doc/operations/metrics/dashboards/variables.md +++ b/doc/operations/metrics/dashboards/variables.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- @@ -16,7 +16,10 @@ Queries that continue to use the old format will show no data. ## Predefined variables -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: +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`. Variables for Prometheus queries +must be lowercase. The supported variables are: - `environment_filter` - `ci_environment_slug` @@ -27,9 +30,6 @@ GitLab supports a limited set of [CI variables](../../../ci/variables/README.md) - `ci_environment_name` - `__range` -NOTE: **Note:** -Variables for Prometheus queries must be lowercase. - ### environment_filter `environment_filter` is automatically expanded to `container_name!="POD",environment="ENVIRONMENT_NAME"` diff --git a/doc/operations/metrics/dashboards/yaml.md b/doc/operations/metrics/dashboards/yaml.md index f92ba4079e9..c3523327c51 100644 --- a/doc/operations/metrics/dashboards/yaml.md +++ b/doc/operations/metrics/dashboards/yaml.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- @@ -45,7 +45,6 @@ Read the documentation on [links](index.md#add-related-links-to-custom-dashboard Dashboards display panel groups in the order they are listed in the dashboard YAML file. -NOTE: **Note:** In GitLab versions 13.3 and below, panel groups were ordered by a `priority` key, which is no longer used. @@ -60,7 +59,6 @@ Panels in a panel group are laid out in rows consisting of two panels per row. A Dashboards display panels in the order they are listed in the dashboard YAML file. -NOTE: **Note:** In GitLab versions 13.3 and below, panels were ordered by a `weight` key, which is no longer used. @@ -103,8 +101,8 @@ When a static label is used and a query returns multiple time series, then all t metrics: - id: my_metric_id query_range: 'http_requests_total' - label: "Time Series" - unit: "count" + label: 'Time Series' + unit: 'count' ``` This may render a legend like this: @@ -117,8 +115,8 @@ For labels to be more explicit, using variables that reflect time series labels metrics: - id: my_metric_id query_range: 'http_requests_total' - label: "Instance: {{instance}}, method: {{method}}" - unit: "count" + label: 'Instance: {{instance}}, method: {{method}}' + unit: 'count' ``` The resulting rendered legend will look like this: @@ -131,8 +129,8 @@ There is also a shorthand value for dynamic dashboard labels that make use of on metrics: - id: my_metric_id query_range: 'http_requests_total' - label: "Method" - unit: "count" + label: 'Method' + unit: 'count' ``` This works by lowercasing the value of `label` and, if there are more words separated by spaces, replacing those spaces with an underscore (`_`). The transformed value is then checked against the labels of the time series returned by the Prometheus query. If a time series label is found that is equal to the transformed value, then the label value will be used and rendered in the legend like this: diff --git a/doc/operations/metrics/dashboards/yaml_number_format.md b/doc/operations/metrics/dashboards/yaml_number_format.md index 1a8bd6f4257..db1606faf8d 100644 --- a/doc/operations/metrics/dashboards/yaml_number_format.md +++ b/doc/operations/metrics/dashboards/yaml_number_format.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- diff --git a/doc/operations/metrics/embed.md b/doc/operations/metrics/embed.md index fcf9679d164..c0b30f18156 100644 --- a/doc/operations/metrics/embed.md +++ b/doc/operations/metrics/embed.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- @@ -17,8 +17,7 @@ metrics to others, and you want to have relevant information directly available. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/29691) in GitLab 12.2. -NOTE: **Note:** -Requires [Kubernetes](../../user/project/integrations/prometheus_library/kubernetes.md) metrics. +This feature 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 diff --git a/doc/operations/metrics/embed_grafana.md b/doc/operations/metrics/embed_grafana.md index 2843a4319a8..532bf150777 100644 --- a/doc/operations/metrics/embed_grafana.md +++ b/doc/operations/metrics/embed_grafana.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- @@ -12,14 +12,13 @@ Grafana metrics can be embedded in [GitLab Flavored Markdown](../../user/markdow You can embed live [Grafana](https://docs.gitlab.com/omnibus/settings/grafana.html) charts in issues as a -[direct linked rendered image](https://grafana.com/docs/grafana/latest/reference/share_panel/#direct-link-rendered-image). -The **Direct link rendered image** sharing dialog within Grafana provides the link: +[direct linked rendered image](https://grafana.com/docs/grafana/latest/reference/share_panel/#direct-link-rendered-image). Your Grafana instance must be available to the +target user, either as a public dashboard or on the same network. The +**Direct link rendered image** sharing dialog within Grafana provides the link: ![Grafana Direct Linked Rendered Image](img/grafana_live_embed.png) -NOTE: **Note:** -For this embed to display correctly, the Grafana instance must be available to the -target user, either as a public dashboard or on the same network. +For this embed to display correctly, the Copy the link and add an image tag as [inline HTML](../../user/markdown.md#inline-html) in your Markdown. You can tweak the query parameters to meet your needs, such as diff --git a/doc/operations/metrics/index.md b/doc/operations/metrics/index.md index 742e6acef0e..39d03ded373 100644 --- a/doc/operations/metrics/index.md +++ b/doc/operations/metrics/index.md @@ -1,6 +1,6 @@ --- stage: Monitor -group: APM +group: Health 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 --- |