instrumental

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: 14

README

Instrumental Output Plugin

This plugin writes metrics to the Instrumental Collector API and requires a project-specific API token.

Instrumental accepts stats in a format very close to Graphite, with the only difference being that the type of stat (gauge, increment) is the first token, separated from the metric itself by whitespace. The increment type is only used if the metric comes in as a counter via the statsd input plugin.

⭐ Telegraf v0.13.1 🏷️ applications 💻 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_token option. See the secret-store documentation for more details on how to use them.

Configuration

# Configuration for sending metrics to an Instrumental project
[[outputs.instrumental]]
  ## Project API Token (required)
  api_token = "API Token"  # required
  ## Prefix the metrics with a given name
  prefix = ""
  ## Stats output template (Graphite formatting)
  ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md#graphite
  template = "host.tags.measurement.field"
  ## Timeout in seconds to connect
  timeout = "2s"
  ## Debug true - Print communication to Instrumental
  debug = false

Documentation

Index

Constants

View Source
const (
	DefaultHost     = "collector.instrumentalapp.com"
	DefaultPort     = 8000
	HelloMessage    = "hello version go/telegraf/1.1\n"
	AuthFormat      = "authenticate %s\n"
	HandshakeFormat = HelloMessage + AuthFormat
)

Variables

View Source
var (
	ValueIncludesBadChar = regexp.MustCompile("[^[:digit:].]")
	MetricNameReplacer   = regexp.MustCompile("[^-[:alnum:]_.]+")
)

Functions

This section is empty.

Types

type Instrumental

type Instrumental struct {
	Host       string          `toml:"host"`
	Port       int             `toml:"port"`
	APIToken   config.Secret   `toml:"api_token"`
	Prefix     string          `toml:"prefix"`
	DataFormat string          `toml:"data_format"`
	Template   string          `toml:"template"`
	Templates  []string        `toml:"templates"`
	Timeout    config.Duration `toml:"timeout"`
	Debug      bool            `toml:"debug"`

	Log telegraf.Logger `toml:"-"`
	// contains filtered or unexported fields
}

func (*Instrumental) Close

func (i *Instrumental) Close() error

func (*Instrumental) Connect

func (i *Instrumental) Connect() error

func (*Instrumental) Init added in v1.27.0

func (i *Instrumental) Init() error

func (*Instrumental) SampleConfig

func (*Instrumental) SampleConfig() string

func (*Instrumental) Write

func (i *Instrumental) Write(metrics []telegraf.Metric) error

Jump to

Keyboard shortcuts

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