From c01fb7efd7f3a1e08a0c73b5d486a178125d9705 Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Thu, 11 Feb 2021 15:42:19 +0100 Subject: [PATCH] Prometheus: Add documentation for ad-hoc filters (#31122) * Prometheus: Add documentation for ad-hoc filters * Update docs/sources/datasources/prometheus.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/datasources/prometheus.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Add link to ad hoc filters doumentation * Change direct url for relative Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> --- docs/sources/datasources/prometheus.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/sources/datasources/prometheus.md b/docs/sources/datasources/prometheus.md index 6fc53b54942..372ceb29067 100644 --- a/docs/sources/datasources/prometheus.md +++ b/docs/sources/datasources/prometheus.md @@ -141,6 +141,11 @@ There are two syntaxes: Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the _Multi-value_ or _Include all value_ options are enabled, Grafana converts the labels from plain text to a regex compatible string. Which means you have to use `=~` instead of `=`. +### Ad hoc filters variable + +Prometheus supports the special [ad hoc filters]({{< relref "../variables/variable-types/add-ad-hoc-filters.md" >}}) variable type. It allows you to specify any number of label/value filters on the fly. These filters are automatically +applied to all your Prometheus queries. + ## Annotations [Annotations]({{< relref "../dashboards/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation