Anyone can help me with the regex to ignore all lines that doesnt contain error or Error at any position of the line?
In the latest version of Filebeat there are two options to solve this issue:
- using processors
processors: or: - when.contains.message: "Error" - when.contains.message: "error"
- using exclude
exclude_lines: ["*error*", "*Error*"]
correcting the regexes here:
exclude_lines: ['.*error.*', '.*Error.*']
Btw. regex matching searches for sub-string matching the regular expression. That is, this config should perform much better:
Tip: do not use double quotes
" for regexes.
but that would exclude all lines containing eError. how do i negate it? I just want to send lines with error messages.
for log lines only having content
[eE]rror, use the
include_lines setting. When using processors, a
not filter negating a predicate also exists.
This topic was automatically closed after 21 days. New replies are no longer allowed.