telegraf/plugins/inputs/nats_consumer
Cameron Sparr eb5dddf0d6 Flush based on buffer size rather than time
this includes:
- Add Accumulator to the Start() function of service inputs
- For message consumer plugins, use the Accumulator to constantly add
  metrics and make Gather a dummy function
- rework unit tests to match this new behavior.
- make "flush_buffer_when_full" a config option that defaults to true

closes #666
2016-04-08 18:34:43 +02:00
..
README.md MQTT Consumer Input plugin 2016-04-08 18:34:42 +02:00
nats_consumer.go Flush based on buffer size rather than time 2016-04-08 18:34:43 +02:00
nats_consumer_test.go Flush based on buffer size rather than time 2016-04-08 18:34:43 +02:00

README.md

NATS Consumer Input Plugin

The NATS consumer plugin reads from specified NATS subjects and adds messages to InfluxDB. The plugin expects messages in the Telegraf Input Data Formats. A Queue Group is used when subscribing to subjects so multiple instances of telegraf can read from a NATS cluster in parallel.

Configuration

# Read metrics from NATS subject(s)
[[inputs.nats_consumer]]
  ### urls of NATS servers
  servers = ["nats://localhost:4222"]
  ### Use Transport Layer Security
  secure = false
  ### subject(s) to consume
  subjects = ["telegraf"]
  ### name a queue group
  queue_group = "telegraf_consumers"
  ### Maximum number of metrics to buffer between collection intervals
  metric_buffer = 100000

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