Edge Delta Regex Filter
2 minute read
See the latest version here.
Overview
This filter type passes all log lines that match the specified regular expression. All unmatched logs are discarded.
Example
The following example obtains the log lines that are error-related, and then discards other lines:
- name: error
type: regex
pattern: "error|ERROR|ERR|Err"
The following example displays the negate parameter. Specifically, the following example discards DEBUG logs, and then passes through other logs:
- name: not_debug
pattern: "DEBUG"
negate: true
Parameters
name
The name
parameter specifies the name for the filter. You refer to this name in other places, for example to refer to a specific filter in a workflow or processor. Names must be unique within the filters:
section. It is a YAML list element so it begins with a -
and a space followed by the string. A name is a required parameter for a filter
filters:
- name: <filter-name>
type: regex
The type
parameter in the filter context specifies the type of filter to apply. A type is a required parameter for a filter.
filters:
- name: <filter-name>
type: <filter-type>
negate
You can use this parameter pass logs that do not meet the pattern. In other words, to reverse the effect of the filter, set this parameter to true. For example, if you set the pattern to only collect error logs, and you set this parameter to true, then the filter will collect all logs that are not error logs. This parameter is optional.
pattern
Enter a regular expression pattern to define which strings to match on. This parameter is required.