telegraf/plugins/outputs/nats
Paweł Żak 39d6b1d5cb
chore: Fix linter findings for errorlint (part3) (#12704)
Co-authored-by: Pawel Zak <Pawel Zak>
2023-02-22 13:38:16 +01:00
..
README.md docs: indicate secret-store support in plugin READMEs (#12592) 2023-02-02 09:31:23 -07:00
nats.go chore: Fix linter findings for errorlint (part3) (#12704) 2023-02-22 13:38:16 +01:00
nats_test.go chore: fix linter findings for unparam and revive.unused-parameter (#12150) 2022-11-08 12:04:12 -07:00
sample.conf chore(outputs): migrate sample configs into separate files (#11131) 2022-05-18 11:30:06 -05:00

README.md

NATS Output Plugin

This plugin writes to a (list of) specified NATS instance(s).

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Secret-store support

This plugin supports secrets from secret-stores for the username and password option. See the secret-store documentation for more details on how to use them.

Configuration

# Send telegraf measurements to NATS
[[outputs.nats]]
  ## URLs of NATS servers
  servers = ["nats://localhost:4222"]

  ## Optional client name
  # name = ""

  ## Optional credentials
  # username = ""
  # password = ""

  ## Optional NATS 2.0 and NATS NGS compatible user credentials
  # credentials = "/etc/telegraf/nats.creds"

  ## NATS subject for producer messages
  subject = "telegraf"

  ## 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

  ## 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"