Grep
Overview
The grep filter plugin “greps” events by the values of specified fields.
Configuration
GrepConfig
and ([]AndSection, optional)
exclude ([]ExcludeSection, optional)
or ([]OrSection, optional)
regexp ([]RegexpSection, optional)
Regexp Directive
Specify filtering rule (as described in the Fluentd documentation). This directive contains two parameters.
key (string, required)
Specify field name in the record to parse.
pattern (string, required)
Pattern expression to evaluate
Example Regexp filter configurations
Fluentd config result:
Exclude Directive
Specify filtering rule to reject events (as described in the Fluentd documentation). This directive contains two parameters.
key (string, required)
Specify field name in the record to parse.
pattern (string, required)
Pattern expression to evaluate
Example Exclude filter configurations
Fluentd config result:
Or Directive
Specify filtering rule (as described in the Fluentd documentation. This directive contains either regexp or exclude directive.
exclude ([]ExcludeSection, optional)
regexp ([]RegexpSection, optional)
Example Or filter configurations
Fluentd config result:
And Directive
Specify filtering rule (as described in the Fluentd documentation. This directive contains either regexp or exclude directive.
exclude ([]ExcludeSection, optional)
regexp ([]RegexpSection, optional)
Example And filter configurations
Fluentd config result: