diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 03:10:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 03:10:29 +0300 |
commit | bd06cdbc9110f94cd2053b866c0df38b1ff6d932 (patch) | |
tree | 46e31de6933d8067a12ae2b6c7faa9ad8ee03d64 /doc/operations/metrics | |
parent | 5b8f2c8a24237cc5b2e2ba365b79e6293b93e459 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/operations/metrics')
-rw-r--r-- | doc/operations/metrics/dashboards/variables.md | 9 |
1 files changed, 9 insertions, 0 deletions
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 |