Grafana: Template Variables: Unterschied zwischen den Versionen
Aus Wiki-WebPerfect
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
Zeile 12: | Zeile 12: | ||
SELECT "host" FROM (SELECT "<value>", "host" FROM "asset_powershell_direct" WHERE $timeFilter) | SELECT "host" FROM (SELECT "<value>", "host" FROM "asset_powershell_direct" WHERE $timeFilter) | ||
'''host''' = is the tag I want to limit by time <br> | '''host''' = is the tag I want to limit by time <br> | ||
− | '''value''' = | + | '''value''' = any Influx FieldKey (just needs to contain any value) <br> |
'''asset_powershell_direct''' = my example measurement-name | '''asset_powershell_direct''' = my example measurement-name | ||
Version vom 18. Mai 2020, 14:37 Uhr
Inhaltsverzeichnis
Troubleshooting
InfluxDB: "SHOW TAG VALUES" does not support a WHERE time clause
Issue
If you use a InfluxDB Query "SHOW TAG VALUES.." it returns all possible values instead of the one present in the time period selected.
There is a open GitHub "Feature Request": https://github.com/influxdata/influxdb/issues/5668
Workaround "Subquery"
Instead of using the following query:
SHOW TAG VALUES FROM "asset_powershell_direct" WITH KEY = "host"
use a subquery as a workaround:
SELECT "host" FROM (SELECT "<value>", "host" FROM "asset_powershell_direct" WHERE $timeFilter)
host = is the tag I want to limit by time
value = any Influx FieldKey (just needs to contain any value)
asset_powershell_direct = my example measurement-name