Update mqtt output docs and changelog

This commit is contained in:
Daniel Nelson
2018-05-18 19:03:00 -07:00
parent 81f5a41bc9
commit 3072b5a493
4 changed files with 97 additions and 27 deletions

View File

@@ -11,6 +11,9 @@ This plugin writes to a [MQTT Broker](http://http://mqtt.org/) acting as a mqtt
topic_prefix = "telegraf"
## QoS policy for messages
## 0 = at most once
## 1 = at least once
## 2 = exactly once
qos = 2
## username and password to connect MQTT server.
@@ -30,17 +33,12 @@ This plugin writes to a [MQTT Broker](http://http://mqtt.org/) acting as a mqtt
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## Batch messages in a topic
## batch = false
## Flag to determine if messages sent in a topic in a flush interval,
## need to be batched into one message.
## batch = true, batches the messages in a topic to one messages
## batch = false, default behaviour
## When true, metrics will be sent in one MQTT message per flush. Otherwise,
## metrics are written one metric per MQTT message.
# batch = false
## Data format to output.
data_format = "influx"
# data_format = "influx"
```
### Required parameters:

View File

@@ -23,16 +23,22 @@ var sampleConfig = `
## ex: prefix/web01.example.com/mem
topic_prefix = "telegraf"
## QoS policy for messages
## 0 = at most once
## 1 = at least once
## 2 = exactly once
# qos = 2
## username and password to connect MQTT server.
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"
## Timeout for write operations. default: 5s
# timeout = "5s"
## client ID, if not set a random ID is generated
# client_id = ""
## Timeout for write operations. default: 5s
# timeout = "5s"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
@@ -40,20 +46,15 @@ var sampleConfig = `
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## When true, metrics will be sent in one MQTT message per flush. Otherwise,
## metrics are written one metric per MQTT message.
# batch = false
## Data format to output.
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
data_format = "influx"
## Batch messages in a topic
## batch = false
## Flag to determine if messages sent in a topic in a flush interval,
## need to be batched into one message.
## batch = true, batches the messages in a topic to one messages
## batch = false, default behaviour
# batch = false
`
type MQTT struct {