@@ -295,6 +295,7 @@ SELECT hostname FROM host WHERE region IN ($region)
...
@@ -295,6 +295,7 @@ SELECT hostname FROM host WHERE region IN ($region)
```
```
### Using Variables in Queries
### Using Variables in Queries
> From Grafana 4.3.0 to 4.6.0, template variables are always quoted automatically so if it is a string value do not wrap them in quotes in where clauses.
> From Grafana 4.3.0 to 4.6.0, template variables are always quoted automatically so if it is a string value do not wrap them in quotes in where clauses.
>
>
> From Grafana 5.0.0, template variable values are only quoted when the template variable is a `multi-value`.
> From Grafana 5.0.0, template variable values are only quoted when the template variable is a `multi-value`.
...
@@ -325,6 +326,14 @@ WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
...
@@ -325,6 +326,14 @@ WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
ORDERBYatimestamp
ORDERBYatimestamp
```
```
#### Disabling Quoting for Multi-value Variables
Grafana automatically creates a quoted, comma-separated string for multi-value variables. For example: if `server01` and `server02` are selected then it will be formatted as: `'server01', 'server02'`. Do disable quoting, use the csv formatting option for variables:
`${servers:csv}`
Read more about variable formatting options in the [Variables]({{<relref"reference/templating.md#advanced-formatting-options">}}) documentation.
## Annotations
## Annotations
[Annotations]({{<relref"reference/annotations.md">}}) allows you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
[Annotations]({{<relref"reference/annotations.md">}}) allows you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
Time series queries should work in alerting conditions. Table formatted queries are not yet supported in alert rule
Time series queries should work in alerting conditions. Table formatted queries are not yet supported in alert rule
conditions.
conditions.
## Configure datasource with provisioning
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafanas provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
Here are some provisioning examples for this datasource.