Docs: InfluxDB variable in query (#24861)

First example of the use of a variable in influxdb query should not use a regex query but a simple one. A first time influxdb user (like me) could think that the proper way to use variable in a dashboard template is to use regex query, but it's not true. Also "=~ /$region/" may be erroniously thought identical to "= '$region'" while instead "=~ /^$region$/" is identical to "= '$region'", and for that type of query is useless (if not slower) use a regex query.
This commit is contained in:
Alcarin 2020-05-20 10:03:08 +02:00 committed by GitHub
parent ead259f26d
commit ad589c3201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,7 @@ You can also create nested variables. For example if you had another variable, f
the hosts variable only show hosts from the current selected region with a query like this:
```sql
SHOW TAG VALUES WITH KEY = "hostname" WHERE region =~ /$region/
SHOW TAG VALUES WITH KEY = "hostname" WHERE region = '$region'
```
You can fetch key names for a given measurement.