3
0
mirror of https://github.com/grafana/grafana.git synced 2025-02-25 18:55:37 -06:00

Add additional documentation about Prometheus + Templated queries

This commit is contained in:
And^Cw Howden 2017-01-15 20:56:53 +01:00 committed by Andrew Howden
parent e5a6c523d7
commit 6edbc4604c
No known key found for this signature in database
GPG Key ID: A23CAA57CB0C32D6

View File

@ -72,4 +72,8 @@ label_values(hostname)
You can also use raw queries & regular expressions to extract anything you might need.
### Using templated variables in queries
When the `Include All` option or `Multi-Value` option is enabled, Grafana converts the labels from plain text to a regex compatible string. If your labels include special values such as `.` or `/`, you will need to use the `=~` or regex match in your Prometheus query. For example, a query for ALERTS, a template query of `label(ALERTS,instance)` and an instance value of `http://example.com` would become `ALERTS{instance=~$instance}` instead of `ALERTS{instance=$instance}`.
![](/img/v2/prometheus_templating.png)