defaults

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

Defaults Processor Plugin

The defaults processor adds configured labels and fields to an event if they not exists. If a field adding fails, an event is marked as failed, but the fields check loop is not breaked.

Configuration

[[processors]]
  # "labels" is a "label name <- label value" map
  [processors.defaults.labels]
    dc = 'east-01'
  # "fields" is a "field path <- field value" map
  [processors.defaults.fields]
    tested = true
    # use dots as a path separator to access nested keys
    "log.level" = 'info'

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Defaults

type Defaults struct {
	*core.BaseProcessor `mapstructure:"-"`
	Labels              map[string]string `mapstructure:"labels"`
	Fields              map[string]any    `mapstructure:"fields"`
}

func (*Defaults) Close

func (p *Defaults) Close() error

func (*Defaults) Init

func (p *Defaults) Init() error

func (*Defaults) Run

func (p *Defaults) Run()

Jump to

Keyboard shortcuts

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