execd

package
v1.26.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 11 Imported by: 0

README

Execd Output Plugin

The execd plugin runs an external program as a daemon.

Telegraf minimum version: Telegraf 1.15.0

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

# Run executable as long-running output plugin
[[outputs.execd]]
  ## One program to run as daemon.
  ## NOTE: process and each argument should each be their own string
  command = ["my-telegraf-output", "--some-flag", "value"]

  ## Environment variables
  ## Array of "key=value" pairs to pass as environment variables
  ## e.g. "KEY=value", "USERNAME=John Doe",
  ## "LD_LIBRARY_PATH=/opt/custom/lib64:/usr/local/libs"
  # environment = []

  ## Delay before the process is restarted after an unexpected termination
  restart_delay = "10s"

  ## Flag to determine whether execd should throw error when part of metrics is unserializable
  ## Setting this to true will skip the unserializable metrics and process the rest of metrics
  ## Setting this to false will throw error when encountering unserializable metrics and none will be processed
  # ignore_serialization_error = false

  ## Data format to export.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
  data_format = "influx"

Example

see examples

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execd

type Execd struct {
	Command                  []string        `toml:"command"`
	Environment              []string        `toml:"environment"`
	RestartDelay             config.Duration `toml:"restart_delay"`
	IgnoreSerializationError bool            `toml:"ignore_serialization_error"`
	Log                      telegraf.Logger
	// contains filtered or unexported fields
}

func (*Execd) Close

func (e *Execd) Close() error

func (*Execd) Connect

func (e *Execd) Connect() error

func (*Execd) Init

func (e *Execd) Init() error

func (*Execd) SampleConfig

func (*Execd) SampleConfig() string

func (*Execd) SetSerializer

func (e *Execd) SetSerializer(s serializers.Serializer)

func (*Execd) Write

func (e *Execd) Write(metrics []telegraf.Metric) error

Jump to

Keyboard shortcuts

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