clone

package
v1.36.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 3 Imported by: 2

README

Clone Processor Plugin

This plugin creates a copy of each metric passing through it, preserving the original metric and allowing modifications such as metric modifiers in the copied metric.

[!NOTE] Metric filtering options apply to both the clone and the original metric.

⭐ Telegraf v1.13.0 🏷️ transformation 💻 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.

Configuration

# Apply metric modifications using override semantics.
[[processors.clone]]
  ## All modifications on inputs and aggregators can be overridden:
  # name_override = "new_name"
  # name_prefix = "new_name_prefix"
  # name_suffix = "new_name_suffix"

  ## Tags to be added (all values must be strings)
  # [processors.clone.tags]
  #   additional_tag = "tag_value"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clone

type Clone struct {
	NameOverride string            `toml:"name_override"`
	NamePrefix   string            `toml:"name_prefix"`
	NameSuffix   string            `toml:"name_suffix"`
	Tags         map[string]string `toml:"tags"`
}

func (*Clone) Apply

func (c *Clone) Apply(in ...telegraf.Metric) []telegraf.Metric

func (*Clone) SampleConfig

func (*Clone) SampleConfig() string

Jump to

Keyboard shortcuts

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