rename

package
v1.20.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 2 Imported by: 6

README

Rename Processor Plugin

The rename processor renames measurements, fields, and tags.

Configuration:
[[processors.rename]]
  ## Specify one sub-table per rename operation.
  [[processors.rename.replace]]
    measurement = "network_interface_throughput"
    dest = "throughput"

  [[processors.rename.replace]]
    tag = "hostname"
    dest = "host"

  [[processors.rename.replace]]
    field = "lower"
    dest = "min"

  [[processors.rename.replace]]
    field = "upper"
    dest = "max"
Tags:

No tags are applied by this processor, though it can alter them by renaming.

Example processing:
- network_interface_throughput,hostname=backend.example.com lower=10i,upper=1000i,mean=500i 1502489900000000000
+ throughput,host=backend.example.com min=10i,max=1000i,mean=500i 1502489900000000000

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rename

type Rename struct {
	Replaces []Replace `toml:"replace"`
}

func (*Rename) Apply

func (r *Rename) Apply(in ...telegraf.Metric) []telegraf.Metric

func (*Rename) Description

func (r *Rename) Description() string

func (*Rename) SampleConfig

func (r *Rename) SampleConfig() string

type Replace

type Replace struct {
	Measurement string `toml:"measurement"`
	Tag         string `toml:"tag"`
	Field       string `toml:"field"`
	Dest        string `toml:"dest"`
}

Jump to

Keyboard shortcuts

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