librato

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: 11 Imported by: 0

README

Librato Output Plugin

This plugin writes to the Librato Metrics API and requires an api_user and api_token which can be obtained here for the account.

The source_tag option in the Configuration file is used to send contextual information from Point Tags to the API.

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

Currently, the plugin does not send any associated Point Tags.

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 fromat

type LMetrics

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

LMetrics is the default struct for Librato's API fromat

type Librato

type Librato struct {
	APIUser   string `toml:"api_user"`
	APIToken  string `toml:"api_token"`
	Debug     bool
	SourceTag string // Deprecated, keeping for backward-compatibility
	Timeout   internal.Duration
	Template  string

	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) Description

func (l *Librato) Description() string

Description is function who return the Description of this output

func (*Librato) SampleConfig

func (l *Librato) SampleConfig() string

SampleConfig is function who return the default configuration for this output

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