amon

package
v1.31.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 11 Imported by: 186

README

Amon Output Plugin

This plugin writes to Amon and requires an serverkey and amoninstance URL which can be obtained here for the account.

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

Metrics are grouped by converting any _ characters to . in the Point Name.

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.

Configuration

# Configuration for Amon Server to send metrics to.
[[outputs.amon]]
  ## Amon Server Key
  server_key = "my-server-key" # required.

  ## Amon Instance URL
  amon_instance = "https://youramoninstance" # required

  ## Connection timeout.
  # timeout = "5s"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amon

type Amon struct {
	ServerKey    string          `toml:"server_key"`
	AmonInstance string          `toml:"amon_instance"`
	Timeout      config.Duration `toml:"timeout"`
	Log          telegraf.Logger `toml:"-"`
	// contains filtered or unexported fields
}

func (*Amon) Close

func (a *Amon) Close() error

func (*Amon) Connect

func (a *Amon) Connect() error

func (*Amon) SampleConfig

func (*Amon) SampleConfig() string

func (*Amon) Write

func (a *Amon) Write(metrics []telegraf.Metric) error

type Metric

type Metric struct {
	Metric string   `json:"metric"`
	Points [1]Point `json:"metrics"`
}

type Point

type Point [2]float64

type TimeSeries

type TimeSeries struct {
	Series []*Metric `json:"series"`
}

Jump to

Keyboard shortcuts

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