influxdb

package
v0.0.0-...-72bdc65 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: MIT Imports: 11 Imported by: 0

README

InfluxDB Output Plugin

This plugin writes to InfluxDB via HTTP or UDP.

Required parameters:
  • urls: List of strings, this is for InfluxDB clustering support. On each flush interval, Telegraf will randomly choose one of the urls to write to. Each URL should start with either http:// or udp://
  • database: The name of the database to write to.
Optional parameters:
  • retention_policy: Retention policy to write to.
  • precision: Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h". note: using "s" precision greatly improves InfluxDB compression.
  • timeout: Write timeout (for the InfluxDB client), formatted as a string. If not provided, will default to 5s. 0s means no timeout (not recommended).
  • username: Username for influxdb
  • password: Password for influxdb
  • user_agent: Set the user agent for HTTP POSTs (can be useful for log differentiation)
  • udp_payload: Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)

    Optional SSL Config

  • ssl_ca: SSL CA
  • ssl_cert: SSL CERT
  • ssl_key: SSL key
  • insecure_skip_verify: Use SSL but skip chain & host verification (default: false)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfluxDB

type InfluxDB struct {
	// URL is only for backwards compatability
	URL             string
	URLs            []string `toml:"urls"`
	Username        string
	Password        string
	Database        string
	UserAgent       string
	Precision       string
	RetentionPolicy string
	Timeout         internal.Duration
	UDPPayload      int `toml:"udp_payload"`

	// Path to CA file
	SSLCA string `toml:"ssl_ca"`
	// Path to host cert file
	SSLCert string `toml:"ssl_cert"`
	// Path to cert key file
	SSLKey string `toml:"ssl_key"`
	// Use SSL but skip chain & host verification
	InsecureSkipVerify bool
	// contains filtered or unexported fields
}

func (*InfluxDB) Close

func (i *InfluxDB) Close() error

func (*InfluxDB) Connect

func (i *InfluxDB) Connect() error

func (*InfluxDB) Description

func (i *InfluxDB) Description() string

func (*InfluxDB) SampleConfig

func (i *InfluxDB) SampleConfig() string

func (*InfluxDB) Write

func (i *InfluxDB) 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