telegraf/plugins/inputs/nats_consumer/README.md

61 lines
2.0 KiB
Markdown
Raw Normal View History

2016-02-09 22:03:46 +00:00
# NATS Consumer Input Plugin
2016-02-10 23:28:52 +00:00
The [NATS][nats] consumer plugin reads from the specified NATS subjects and
creates metrics using one of the supported [input data formats][].
2016-02-10 23:28:52 +00:00
A [Queue Group][queue group] is used when subscribing to subjects so multiple
instances of telegraf can read from a NATS cluster in parallel.
### Configuration:
2016-02-09 22:03:46 +00:00
```toml
2016-02-10 23:28:52 +00:00
[[inputs.nats_consumer]]
## urls of NATS servers
2016-02-10 23:28:52 +00:00
servers = ["nats://localhost:4222"]
## subject(s) to consume
2016-02-10 23:28:52 +00:00
subjects = ["telegraf"]
## name a queue group
2016-02-10 23:28:52 +00:00
queue_group = "telegraf_consumers"
2016-02-09 22:03:46 +00:00
## Optional credentials
# username = ""
# password = ""
## Use Transport Layer Security
# secure = false
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## Sets the limits for pending msgs and bytes for each subscription
## These shouldn't need to be adjusted except in very high throughput scenarios
# pending_message_limit = 65536
# pending_bytes_limit = 67108864
## Maximum messages to read from the broker that have not been written by an
## output. For best throughput set based on the number of metrics within
## each message and the size of the output's metric_batch_size.
##
## For example, if each message from the queue contains 10 metrics and the
## output metric_batch_size is 1000, setting this to 100 will ensure that a
## full batch is collected and the write is triggered immediately without
## waiting until the next flush_interval.
# max_undelivered_messages = 1000
## Data format to consume.
2017-04-27 21:59:18 +00:00
## 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_INPUT.md
2016-02-10 23:28:52 +00:00
data_format = "influx"
```
[nats]: https://www.nats.io/about/
[input data formats]: /docs/DATA_FORMATS_INPUT.md
[queue group]: https://www.nats.io/documentation/concepts/nats-queueing/