Add NATS output plugin.

Added NATS server container needed for tests.

Added NATS output plug-in. Fixes #1487

NATS output plug-in use internal.GetTLSConfig to instrument TLS configuration.

Added NATS output plug-in to changelog.

closes #1487
closes #1697
This commit is contained in:
Paulo Pires
2016-09-01 13:11:42 +01:00
committed by Cameron Sparr
parent 1271f9d71a
commit 6b1cc67664
8 changed files with 206 additions and 4 deletions

View File

@@ -0,0 +1,37 @@
# NATS Output Plugin
This plugin writes to a (list of) specified NATS instance(s).
```
[[outputs.nats]]
## URLs of NATS servers
servers = ["nats://localhost:4222"]
## Optional credentials
# username = ""
# password = ""
## NATS subject for producer messages
subject = "telegraf"
## Optional TLS Config
## CA certificate used to self-sign NATS server(s) TLS certificate(s)
# tls_ca = "/etc/telegraf/ca.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## Data format to output.
## 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_OUTPUT.md
data_format = "influx"
```
### Required parameters:
* `servers`: List of strings, this is for NATS clustering support. Each URL should start with `nats://`.
* `subject`: The NATS subject to publish to.
### Optional parameters:
* `username`: Username for NATS
* `password`: Password for NATS
* `tls_ca`: TLS CA
* `insecure_skip_verify`: Use SSL but skip chain & host verification (default: false)