nats

package
v0.0.0-...-0e59cf9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 7 Imported by: 0

README

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"

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NATS

type NATS struct {
	Servers  []string `toml:"servers"`
	Secure   bool     `toml:"secure"`
	Username string   `toml:"username"`
	Password string   `toml:"password"`
	Subject  string   `toml:"subject"`
	tls.ClientConfig
	// contains filtered or unexported fields
}

func (*NATS) Close

func (n *NATS) Close() error

func (*NATS) Connect

func (n *NATS) Connect() error

func (*NATS) Description

func (n *NATS) Description() string

func (*NATS) SampleConfig

func (n *NATS) SampleConfig() string

func (*NATS) SetSerializer

func (n *NATS) SetSerializer(serializer serializers.Serializer)

func (*NATS) Write

func (n *NATS) Write(metrics []telegraf.Metric) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL