Description
The Filter by Field processor allows events to pass based on the presence of a specific key-value pair. Events that returntrue for the comparison operands are forwarded.
Use
You can use this processor to drop events that may not be meaningful, or to reduce the total amount of data forwarded to a subsequent processor or destination. This can be useful, for example, for dropping events that may be DEBUG level and not needed for long term storage, or metrics that are zero and should not need to be recorded.Configuration
The Filter processor uses conditional statements to set the filter criteria. The format of this conditional statement is:Field (comparison operator) Value. You can add conditions including AND and OR, as well as nested expressions. A Filter Processor can contain multiple conditional statements.
The filter terms you enter for Value are treated as case-insensitive by default. Click the button next to the Value field to activate case-sensitivity.
Operators
Contents Operators
String Operators
Comparison Operators
Type Operators
Examples
Filter Greater
Before
Filter Options
After
Filter Equals
Before
Filter Options
After
Filter Contains
Before
Filter Options
After
Filter is Empty
Before
Filter Options
After
Filter Debug Data
In some cases, log data streams include extraneous data such as Debug level information. These would normally not be needed in the production monitoring stream and can be discarded. This example uses thelog level field as a filtering operator to drop anything with a DEBUG value.
Before
Filter Options
After
Filter by State Variable
Filter events based on a pipeline state variable. This works well with Responsive Pipelines, where you can change filtering behavior based on the pipeline’s operational state.Filter Options
This configuration forwards events only when the pipeline’s
operational_state is set to incident. During normal operation, the filter drops events.
