summaryrefslogtreecommitdiff
path: root/doc/user/project/integrations
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-27 21:09:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-27 21:09:17 +0000
commitc77fda905a8619b756163c10a75171dc9cfe7084 (patch)
treeffa93b37bfe4b99ba0b8584c7a0bd1a4cd19772a /doc/user/project/integrations
parente0fa0638a422c3e20d4423c9bb69d79afc9c7d3d (diff)
downloadgitlab-ce-c77fda905a8619b756163c10a75171dc9cfe7084.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/project/integrations')
-rw-r--r--doc/user/project/integrations/img/prometheus_dashboard_label_variable_shorthand.pngbin0 -> 3897 bytes
-rw-r--r--doc/user/project/integrations/img/prometheus_dashboard_label_variables.pngbin0 -> 8076 bytes
-rw-r--r--doc/user/project/integrations/img/prometheus_dashboard_repeated_label.pngbin0 -> 3116 bytes
-rw-r--r--doc/user/project/integrations/jira.md4
-rw-r--r--doc/user/project/integrations/prometheus.md52
5 files changed, 51 insertions, 5 deletions
diff --git a/doc/user/project/integrations/img/prometheus_dashboard_label_variable_shorthand.png b/doc/user/project/integrations/img/prometheus_dashboard_label_variable_shorthand.png
new file mode 100644
index 00000000000..15111a97464
--- /dev/null
+++ b/doc/user/project/integrations/img/prometheus_dashboard_label_variable_shorthand.png
Binary files differ
diff --git a/doc/user/project/integrations/img/prometheus_dashboard_label_variables.png b/doc/user/project/integrations/img/prometheus_dashboard_label_variables.png
new file mode 100644
index 00000000000..9b94d0c6afa
--- /dev/null
+++ b/doc/user/project/integrations/img/prometheus_dashboard_label_variables.png
Binary files differ
diff --git a/doc/user/project/integrations/img/prometheus_dashboard_repeated_label.png b/doc/user/project/integrations/img/prometheus_dashboard_repeated_label.png
new file mode 100644
index 00000000000..d43a890f0fa
--- /dev/null
+++ b/doc/user/project/integrations/img/prometheus_dashboard_repeated_label.png
Binary files differ
diff --git a/doc/user/project/integrations/jira.md b/doc/user/project/integrations/jira.md
index 0bfb13ba54f..1af56b79e82 100644
--- a/doc/user/project/integrations/jira.md
+++ b/doc/user/project/integrations/jira.md
@@ -71,8 +71,8 @@ in the table below.
| Field | Description |
| ----- | ----------- |
-| `Web URL` | The base URL to the Jira instance web interface which is being linked to this GitLab project. E.g., `https://Jira.example.com`. |
-| `Jira API URL` | The base URL to the Jira instance API. Web URL value will be used if not set. E.g., `https://jira-api.example.com`. |
+| `Web URL` | The base URL to the Jira instance web interface which is being linked to this GitLab project. E.g., `https://jira.example.com`. |
+| `Jira API URL` | The base URL to the Jira instance API. Web URL value will be used if not set. E.g., `https://jira-api.example.com`. Leave this field blank (or use the same value of `Web URL`) if using **Jira Cloud**. |
| `Username/Email` | Created when [configuring Jira step](#configuring-jira). Use `username` for **Jira Server** or `email` for **Jira Cloud**. |
| `Password/API token` |Created in [configuring Jira step](#configuring-jira). Use `password` for **Jira Server** or `API token` for **Jira Cloud**. |
| `Transition ID` | This is the ID of a transition that moves issues to the desired state. It is possible to insert transition ids separated by `,` or `;` which means the issue will be moved to each state after another using the given order. **Closing Jira issues via commits or Merge Requests won't work if you don't set the ID correctly.** |
diff --git a/doc/user/project/integrations/prometheus.md b/doc/user/project/integrations/prometheus.md
index 624ab0616c4..2f1be1c2257 100644
--- a/doc/user/project/integrations/prometheus.md
+++ b/doc/user/project/integrations/prometheus.md
@@ -191,7 +191,7 @@ For example:
metrics:
- id: metric_of_ages
query_range: 'http_requests_total'
- label: "Metric of Ages"
+ label: "Instance: {{instance}}, method: {{method}}"
unit: "count"
```
@@ -267,10 +267,56 @@ The following tables outline the details of expected properties.
| ------ | ------ | ------ | ------ |
| `id` | string | no | Used for associating dashboard metrics with database records. Must be unique across dashboard configuration files. Required for [alerting](#setting-up-alerts-for-prometheus-metrics-ultimate) (support not yet enabled, see [relevant issue](https://gitlab.com/gitlab-org/gitlab-foss/issues/60319)). |
| `unit` | string | yes | Defines the unit of the query's return data. |
-| `label` | string | no, but highly encouraged | Defines the legend-label for the query. Should be unique within the panel's metrics. |
+| `label` | string | no, but highly encouraged | Defines the legend-label for the query. Should be unique within the panel's metrics. Can contain time series labels as interpolated variables. |
| `query` | string | yes if `query_range` is not defined | Defines the Prometheus query to be used to populate the chart/panel. If defined, the `query` endpoint of the [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/) will be utilized. |
| `query_range` | string | yes if `query` is not defined | Defines the Prometheus query to be used to populate the chart/panel. If defined, the `query_range` endpoint of the [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/) will be utilized. |
+##### Dynamic labels
+
+Dynamic labels are useful when multiple time series are returned from a Prometheus query.
+
+When a static label is used and a query returns multiple time series, then all the legend items will be labeled the same, which makes identifying each time series difficult:
+
+```yaml
+metrics:
+ - id: metric_of_ages
+ query_range: 'http_requests_total'
+ label: "Time Series"
+ unit: "count"
+```
+
+This may render a legend like this:
+
+![repeated legend label chart](img/prometheus_dashboard_repeated_label.png)
+
+For labels to be more explicit, using variables that reflect time series labels is a good practice. The variables will be replaced by the values of the time series labels when the legend is rendered:
+
+```yaml
+metrics:
+ - id: metric_of_ages
+ query_range: 'http_requests_total'
+ label: "Instance: {{instance}}, method: {{method}}"
+ unit: "count"
+```
+
+The resulting rendered legend will look like this:
+
+![legend with label variables](img/prometheus_dashboard_label_variables.png)
+
+There is also a shorthand value for dynamic dashboard labels that make use of only one time series label:
+
+```yaml
+metrics:
+ - id: metric_of_ages
+ query_range: 'http_requests_total'
+ label: "Method"
+ unit: "count"
+```
+
+This will render into:
+
+![legend with label shorthand variable](img/prometheus_dashboard_label_variable_shorthand.png)
+
#### Panel types for dashboards
The below panel types are supported in monitoring dashboards.
@@ -290,7 +336,7 @@ panel_groups:
metrics:
- id: area_http_requests_total
query_range: 'http_requests_total'
- label: "Metric of Ages"
+ label: "Instance: {{instance}}, Method: {{method}}"
unit: "count"
```