Visualization of Telegraf MQTT consumer input

#1

I have a MQTT broker running, which provides information about my electrical power consumption.
telegraf is configured as follows:

[[inputs.mqtt_consumer]]
servers = [“emonpi.local:1883”]
qos = 0
topics = [
“emon/smartpi/#”,
]
client_id = "influxdb"
username = "user"
password = "pass"
data_format = "value"
data_type = “float”

When I start telegraf from the command line, there is no error message, but
MQTT Client Connected

Looks good to me :slight_smile:
But influx CLI looks strange:

influx
use telegraf
show field keys

provides

name: mqtt_consumer
fieldKey fieldType


value float

name: processes
fieldKey fieldType


blocked integer
idle integer
running integer

Besides mqtt telegraf provide the default inpus such as CPI and so on.
I’m able to visualize them with grafana, but
for all mqtt data grafana plots are empty.

Nevertheless, it seems that some inputs are present.
I can define a filter within grafan with “where”, which shows as “topic” my defines topics.
Is there a special trick for MQTT?
Do I need to define field keys somehow?

#2

SOLVED.
Everythig was fine, except selected time selection.

1 Like
#3

@TriCX Glad you were able to get this working!