Regex Filters

George Alpizar
George Alpizar
  • Updated

Overview

This filter type passes all log lines that match the specified regular expression. All unmatched logs are discarded.


Review Parameters

Review the following parameters that you can configure in the Edge Delta App:

YAML Description
name

Enter a descriptive name for this filter.

When you create a workflow, you will use this label to enter your filter into the workflow.

This parameter is required. 

Review the following example: 

name: error
type

Select (or enter) regex.

This parameter is required. 

Review the following example: 

regex
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. 

Review the following example: 

true
pattern

Enter a regular expression pattern to define which strings to match on.

This parameter is optional. 

Review the following example: 

"error|ERROR|ERR|Err"

Review Sample Configuration 

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

 

Share this document