graphite

package
v1.16.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 11 Imported by: 188

README

Graphite Output Plugin

This plugin writes to Graphite via raw TCP.

For details on the translation between Telegraf Metrics and Graphite output, see the Graphite Data Format

Configuration:
# Configuration for Graphite server to send metrics to
[[outputs.graphite]]
  ## TCP endpoint for your graphite instance.
  ## If multiple endpoints are configured, the output will be load balanced.
  ## Only one of the endpoints will be written to with each iteration.
  servers = ["localhost:2003"]
  ## Prefix metrics name
  prefix = ""
  ## Graphite output template
  ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
  template = "host.tags.measurement.field"

  ## Graphite templates patterns
  ## 1. Template for cpu
  ## 2. Template for disk*
  ## 3. Default template
  # templates = [
  #  "cpu tags.measurement.host.field",
  #  "disk* measurement.field",
  #  "host.measurement.tags.field"
  #]

  ## Enable Graphite tags support
  # graphite_tag_support = false

  ## Character for separating metric name and field for Graphite tags
  # graphite_separator = "."

  ## timeout in seconds for the write connection to graphite
  timeout = 2

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graphite

type Graphite struct {
	GraphiteTagSupport bool
	GraphiteSeparator  string
	// URL is only for backwards compatibility
	Servers   []string
	Prefix    string
	Template  string
	Templates []string
	Timeout   int

	tlsint.ClientConfig
	// contains filtered or unexported fields
}

func (*Graphite) Close

func (g *Graphite) Close() error

func (*Graphite) Connect

func (g *Graphite) Connect() error

func (*Graphite) Description

func (g *Graphite) Description() string

func (*Graphite) SampleConfig

func (g *Graphite) SampleConfig() string

func (*Graphite) Write

func (g *Graphite) Write(metrics []telegraf.Metric) error

Choose a random server in the cluster to write to until a successful write occurs, logging each unsuccessful. If all servers fail, return error.

Jump to

Keyboard shortcuts

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