Hi! I have a problem with SHOW TAG VALUES which shows no records
My data looks like this
> show series
key
---
mqtt_consumer,host=ploter,topic=tele/temp1/SENSOR
mqtt_consumer,host=ploter,topic=tele/temp2/SENSOR
> show measurements
name: measurements
name
----
mqtt_consumer
> select * from mqtt_consumer
name: mqtt_consumer
time AM2301_DewPoint AM2301_Humidity AM2301_Temperature host topic
---- --------------- --------------- ------------------ ---- -----
1642969842839118371 10.3 45.7 22.6 ploter tele/temp2/SENSOR
1642969845438157479 10.9 43.4 24.1 ploter tele/temp1/SENSOR
1642969852853777919 10.3 45.7 22.6 ploter tele/temp2/SENSOR
1642969855449937226 10.7 43.3 24 ploter tele/temp1/SENSOR
> show tag keys
name: mqtt_consumer
tagKey
------
host
topic
> show tag values with key = "topic"
NOTHING :(
> show tag values with key = "host"
NOTHING :(
My config is
[global_tags]
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = true
quiet = false
logtarget = "file"
logfile = "/var/log/telegraf/logfile"
logfile_rotation_max_size = "10MB"
hostname = ""
omit_hostname = false
[[outputs.influxdb]]
urls = ["http://127.0.0.1:8086"]
database = "sensors"
username = "xxx"
password = "xxx"
[[outputs.file]]
files = ["stdout", "/tmp/metrics.out"]
[[inputs.mqtt_consumer]]
servers = ["tcp://127.0.0.1:1883"]
topics = ["tele/+/SENSOR"]
data_format = "json"
Generaly I have problem with Grafana dashboard.
When I create new panel and start adding new query when I click ā+ā button after WHERE clause I can choose a KEY (host/topic) but when I am trying to point specific topic (select tag value) i have noting but āNo options foundā on the list.
In a moment of selecting specific topic, Grafana sends below query to InfluxDB http connector
"GET /query?db=sensors&epoch=ms&q=SHOW+TAG+VALUES+FROM+%22mqtt_consum
er%22+WITH+KEY+%3D+%22topic%22 HTTP/1.1" 200 57 "-" "Grafana/8.3.4" fa0444dd-7c89-11ec-8287-000000000000 1204
And it gets empty response (the same as my manual influx query above)
When I cannot select topic, I canāt distinguish between sensors and I have all temperature measurement in one series of data (I want to plot every temperature sensor separatly).
The fun thing is, that where I manually prepare query in Grafana, it is working fine (data is returned by influxdb datasource)
SELECT mean("AM2301_Humidity") FROM "mqtt_consumer" WHERE topic = 'tele/temp1/SENSOR' AND $timeFilter GROUP BY time($__interval) fill(null)
A spent whole weekend to figure it out but without luck
HOW to force
> show tag values with key = "topic"
TO return proper data?
HELP!? ANY ONE?
THANKS!!!