telegraf/plugins/inputs/mqtt_consumer
Cameron Sparr 2eee1b84fb
break telegraf registry into separate package
this is for supporting external plugins.

external plugins will depend on a few telegraf interface types, as well
as a common telegraf registry.

this will allow external and internal plugins to both share this package
and make it easier to vendor/version the whole thing semantically, which
will make it easier to keep plugins supported across build and telegraf
versions.

see #1717
2017-02-06 11:16:29 +00:00
..
README.md Update etc/telegraf.conf, mqtt_cons readme 2016-05-10 14:18:55 -07:00
mqtt_consumer.go break telegraf registry into separate package 2017-02-06 11:16:29 +00:00
mqtt_consumer_test.go metric: Fix negative number handling 2017-02-01 10:07:31 +00:00

README.md

MQTT Consumer Input Plugin

The MQTT consumer plugin reads from specified MQTT topics and adds messages to InfluxDB. The plugin expects messages in the Telegraf Input Data Formats.

Configuration:

# Read metrics from MQTT topic(s)
[[inputs.mqtt_consumer]]
  servers = ["localhost:1883"]
  ## MQTT QoS, must be 0, 1, or 2
  qos = 0

  ## Topics to subscribe to
  topics = [
    "telegraf/host01/cpu",
    "telegraf/+/mem",
    "sensors/#",
  ]

  # if true, messages that can't be delivered while the subscriber is offline
  # will be delivered when it comes back (such as on service restart).
  # NOTE: if true, client_id MUST be set
  persistent_session = false
  # If empty, a random client ID will be generated.
  client_id = ""

  ## username and password to connect MQTT server.
  # username = "telegraf"
  # password = "metricsmetricsmetricsmetrics"

  ## Optional SSL Config
  # ssl_ca = "/etc/telegraf/ca.pem"
  # ssl_cert = "/etc/telegraf/cert.pem"
  # ssl_key = "/etc/telegraf/key.pem"
  ## Use SSL but skip chain & host verification
  # insecure_skip_verify = false

  ## Data format to consume.
  ## Each data format has it's own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  data_format = "influx"

Tags:

  • All measurements are tagged with the incoming topic, ie topic=telegraf/host01/cpu