telegraf/plugins/inputs/nats_consumer/README.md

33 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2016-02-09 22:03:46 +00:00
# NATS Consumer Input Plugin
2016-02-10 23:28:52 +00:00
2016-02-09 22:03:46 +00:00
The [NATS](http://www.nats.io/about/) consumer plugin reads from
2016-02-10 23:28:52 +00:00
specified NATS subjects and adds messages to InfluxDB. The plugin expects messages
2016-02-18 20:37:36 +00:00
in the [Telegraf Input Data Formats](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md).
2016-02-10 23:28:52 +00:00
A [Queue Group](http://www.nats.io/documentation/concepts/nats-queueing/)
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
# Read metrics from NATS subject(s)
[[inputs.nats_consumer]]
## urls of NATS servers
2016-02-10 23:28:52 +00:00
servers = ["nats://localhost:4222"]
## Use Transport Layer Security
2016-02-10 23:28:52 +00:00
secure = false
## 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"
## Maximum number of metrics to buffer between collection intervals
metric_buffer = 100000
2016-02-09 22:03:46 +00:00
## 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
2016-02-10 23:28:52 +00:00
data_format = "influx"
```