Open plkokanov opened 3 months ago
The Gardener project currently lacks enough active contributors to adequately respond to all issues. This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
/lifecycle stale
How to categorize this issue?
/kind enhancement
What would you like to be added: Add a field in the
rsyslogRelpConfig.loggingRules
that allows filtering based on message content. The filters should allow for both excluding or including messages based on their content via regular expressions. This could be done by addingregex
andexclude
fields which should be pointers to strings and marked as optional. Below is an example of what the new api would look like:To implement the regular expression, the following
RainerScript
functions could be used in the rsyslog config:re_match_i()
- case insensitive match orre_match()
- case sensitive match.This would result in the following rsyslog config:
This means that
messageContent
include
andexclude
directives areand
-ed when they are part of the sameloggingRule
. A subsequentloggingRule
could contain the sameprogramNames
and sameseverity
but differentmessageContent
fields resulting in anor
operation - this is becauseloggingRules[]
are checked in-order.Currently the
loggingRules[].severity
field is always required. However, we could change that and make at least one ofseverity
,programNames
ormessageContent
be required.Why is this needed: Currently, the
shoot-rsyslog-relp
extension only allows for logs to be filtered based on the program name (that generated them) and their severity. However, this is not enough as sometimes users might want to further fine tune the filtering based on the message content of the logs.