From 4844bf9be383a15cff44b6270e1355b7b0977b7f Mon Sep 17 00:00:00 2001 From: bergquist Date: Wed, 12 Jul 2017 07:37:44 +0200 Subject: [PATCH] docs(prometheus): updates invalid template example --- docs/sources/features/datasources/prometheus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/features/datasources/prometheus.md b/docs/sources/features/datasources/prometheus.md index ed5d752ab94..a6f544914b8 100644 --- a/docs/sources/features/datasources/prometheus.md +++ b/docs/sources/features/datasources/prometheus.md @@ -78,7 +78,7 @@ For details of *metric names*, *label names* and *label values* are please refer There are two syntaxes: - `$` Example: rate(http_requests_total{job=~"$job"}[5m]) -- `[[varname]]` Example: rate(http_requests_total{job="my[[job]]"}[5m]) +- `[[varname]]` Example: rate(http_requests_total{job=~"[[job]]"}[5m]) 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 `=`.