beats: github.com/elastic/beats/libbeat/processors Index | Files | Directories

package processors

import "github.com/elastic/beats/libbeat/processors"

Index

Package Files

conditionals.go config.go namespace.go processor.go registry.go

Variables

var MandatoryExportedFields = []string{"type"}

fields that should be always exported

func Close Uses

func Close(p Processor) error

Close closes a processor if it implements the Closer interface

func NewConditionList Uses

func NewConditionList(config []conditions.Config) ([]conditions.Condition, error)

NewConditionList takes a slice of Config objects and turns them into real Condition objects.

func Plugin Uses

func Plugin(name string, c Constructor) map[string][]interface{}

func RegisterPlugin Uses

func RegisterPlugin(name string, constructor Constructor)

type Closer Uses

type Closer interface {
    Close() error
}

Closer defines the interface for processors that should be closed after using them. Close() is not part of the Processor interface because implementing this method is also a way to indicate that the processor keeps some resource that needs to be released or orderly closed.

type Constructor Uses

type Constructor func(config *common.Config) (Processor, error)

func NewConditional Uses

func NewConditional(
    ruleFactory Constructor,
) Constructor

NewConditional returns a constructor suitable for registering when conditionals as a plugin.

type IfThenElseProcessor Uses

type IfThenElseProcessor struct {
    // contains filtered or unexported fields
}

IfThenElseProcessor executes one set of processors (then) if the condition is true and another set of processors (else) if the condition is false.

func NewIfElseThenProcessor Uses

func NewIfElseThenProcessor(cfg *common.Config) (*IfThenElseProcessor, error)

NewIfElseThenProcessor construct a new IfThenElseProcessor.

func (*IfThenElseProcessor) Run Uses

func (p *IfThenElseProcessor) Run(event *beat.Event) (*beat.Event, error)

Run checks the if condition and executes the processors attached to the then statement or the else statement based on the condition.

func (*IfThenElseProcessor) String Uses

func (p *IfThenElseProcessor) String() string

type Namespace Uses

type Namespace struct {
    // contains filtered or unexported fields
}

func NewNamespace Uses

func NewNamespace() *Namespace

func (*Namespace) Constructors Uses

func (ns *Namespace) Constructors() map[string]Constructor

Constructors returns all registered processor constructors and its names.

func (*Namespace) Plugin Uses

func (ns *Namespace) Plugin() Constructor

func (*Namespace) Register Uses

func (ns *Namespace) Register(name string, factory Constructor) error

type PluginConfig Uses

type PluginConfig []*common.Config

PluginConfig represents the list of processors.

type Processor Uses

type Processor interface {
    Run(event *beat.Event) (*beat.Event, error)
    String() string
}

Processor is the interface that all processors must implement

func NewConditionRule Uses

func NewConditionRule(
    config conditions.Config,
    p Processor,
) (Processor, error)

NewConditionRule returns a processor that will execute the provided processor if the condition is true.

type Processors Uses

type Processors struct {
    List []Processor
    // contains filtered or unexported fields
}

Processors is

func New Uses

func New(config PluginConfig) (*Processors, error)

New creates a list of processors from a list of free user configurations.

func NewList Uses

func NewList(log *logp.Logger) *Processors

NewList creates a new empty processor list. Additional processors can be added to the List field.

func (*Processors) AddProcessor Uses

func (procs *Processors) AddProcessor(p Processor)

AddProcessor adds a single Processor to Processors

func (*Processors) AddProcessors Uses

func (procs *Processors) AddProcessors(p Processors)

AddProcessors adds more Processors to Processors

func (*Processors) All Uses

func (procs *Processors) All() []beat.Processor

func (*Processors) Close Uses

func (procs *Processors) Close() error

func (*Processors) Run Uses

func (procs *Processors) Run(event *beat.Event) (*beat.Event, error)

Run executes the all processors serially and returns the event and possibly an error. If the event has been dropped (canceled) by a processor in the list then a nil event is returned.

func (*Processors) RunBC Uses

func (procs *Processors) RunBC(event common.MapStr) common.MapStr

RunBC (run backwards-compatible) applies the processors, by providing the old interface based on common.MapStr. The event us temporarily converted to beat.Event. By this 'conversion' the '@timestamp' field can not be accessed by processors. Note: this method will be removed, when the publisher pipeline BC-API is to

be removed.

func (Processors) String Uses

func (procs Processors) String() string

type WhenProcessor Uses

type WhenProcessor struct {
    // contains filtered or unexported fields
}

WhenProcessor is a tuple of condition plus a Processor.

func (*WhenProcessor) Run Uses

func (r *WhenProcessor) Run(event *beat.Event) (*beat.Event, error)

Run executes this WhenProcessor.

func (*WhenProcessor) String Uses

func (r *WhenProcessor) String() string

Directories

PathSynopsis
actions
add_cloud_metadata
add_docker_metadata
add_formatted_index
add_host_metadata
add_id
add_id/generator
add_kubernetes_metadata
add_locale
add_observer_metadata
add_process_metadata
checks
communityid
convert
decode_csv_fields
dissect
dnsPackage dns implements a processor that can perform DNS lookups by sending a DNS request over UDP to a recursive nameserver.
extract_array
fingerprint
ratelimit
registered_domain
script
script/javascript
script/javascript/module
script/javascript/module/console
script/javascript/module/net
script/javascript/module/path
script/javascript/module/processor
script/javascript/module/require
timeseries
timestamp
translate_sidPackage translate_sid provides a Beat processor for converting Windows security identifiers (SIDs) to account names.
urldecode
util

Package processors imports 10 packages (graph) and is imported by 1163 packages. Updated 2021-01-27. Refresh now. Tools for package owners.