Second set of eyes on my MQTT Telegraf config file please

This is my Telegraf config which does not write the data to InfluxDB Cloud.

  urls = [""]
  token = "$INFLUX_TOKEN"
  organization = "myorg"
  bucket = "MQTT_sensor_data"

  servers = [""]
  topics = [
  topic_tag = "topic"
  qos = 2
  max_undelivered_messages = 100
  persistent_session = true
  client_id = "influxusername"
  username = "influxusername"
  password = "password123"
  data_format = "influx"
  tag_keys = [

This is my MQTT message from another client to my HiveMQ broker.

mosquitto_pub -h -p 8883 -u "username" -P "mypassword" -t 'my/test/topic' -m 'sensors, sensor1=counter value=0, sensor2=counter2 value=5'

What could be going wrong? And how would I know where to look for errors?

Probably start with the telegraf service logs. Are there any errors in there?

If that’s all clean, what’s in the influxdb service logs?

1 Like

Where would I find the Telegraf service logs? And is Telegraf supposed to be running in the cloud along side influxdb?

Did you find the log files?
In the telegraf config file (agent section) you can find the settings related to logging.

If everything is ok on the Telegraf side check the InflxDB logs, I’ve no experience with InflxDB cloud so I don’t know where to look for them.

Telegraf is not supposed to run alongside InflxDB cloud, as it’s SAAS and you get only the database, not a whole Virtual Machine. If you want Telegraf in the cloud you will need to get a VM on your own.