librato

package
v1.32.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 13 Imported by: 187

README

Librato Output Plugin

This plugin writes metrics to the Librato service. It requires an api_user and api_token which can be obtained here for your account.

The source_tag option in the Configuration file is used to send contextual information from Point Tags to the API. Besides from this, the plugin currently does not send any additional associated Point Tags.

[!IMPOTANT] If the point value being sent cannot be converted to a float64, the metric is skipped.

⭐ Telegraf v0.2.0 🏷️ cloud, datastore 💻 all

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 api_user and api_token option. See the secret-store documentation for more details on how to use them.

Configuration

# Configuration for Librato API to send metrics to.
[[outputs.librato]]
  ## Librato API Docs
  ## http://dev.librato.com/v1/metrics-authentication
  ## Librato API user
  api_user = "telegraf@influxdb.com" # required.
  ## Librato API token
  api_token = "my-secret-token" # required.
  ## Debug
  # debug = false
  ## Connection timeout.
  # timeout = "5s"
  ## Output source Template (same as graphite buckets)
  ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md#graphite
  ## This template is used in librato's source (not metric's name)
  template = "host"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gauge

type Gauge struct {
	Name        string  `json:"name"`
	Value       float64 `json:"value"`
	Source      string  `json:"source"`
	MeasureTime int64   `json:"measure_time"`
}

Gauge is the gauge format for Librato's API format

type LMetrics added in v1.14.0

type LMetrics struct {
	Gauges []*Gauge `json:"gauges"`
}

LMetrics is the default struct for Librato's API format

type Librato

type Librato struct {
	APIUser   config.Secret   `toml:"api_user"`
	APIToken  config.Secret   `toml:"api_token"`
	Debug     bool            `toml:"debug"`
	SourceTag string          `toml:"source_tag" deprecated:"1.0.0;1.35.0;use 'template' instead"`
	Timeout   config.Duration `toml:"timeout"`
	Template  string          `toml:"template"`
	Log       telegraf.Logger `toml:"-"`

	APIUrl string
	// contains filtered or unexported fields
}

Librato structure for configuration and client

func NewLibrato

func NewLibrato(apiURL string) *Librato

NewLibrato is the main constructor for librato output plugins

func (*Librato) Close

func (l *Librato) Close() error

Close is used to close the connection to librato Output

func (*Librato) Connect

func (l *Librato) Connect() error

Connect is the default output plugin connection function who make sure it can connect to the endpoint

func (*Librato) SampleConfig

func (*Librato) SampleConfig() string

func (*Librato) Write

func (l *Librato) Write(metrics []telegraf.Metric) error

Jump to

Keyboard shortcuts

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