From ad1fe274a2048c827f6f37bfc60c843e9ad27503 Mon Sep 17 00:00:00 2001 From: Bart Geesink Date: Thu, 11 Jan 2024 15:41:31 +0100 Subject: [PATCH] Rsyslog: Filter messages that come from the stepup dockers --- roles/rsyslog/templates/sc_ruleset.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/rsyslog/templates/sc_ruleset.conf.j2 b/roles/rsyslog/templates/sc_ruleset.conf.j2 index ec4dc0795..9dde13702 100644 --- a/roles/rsyslog/templates/sc_ruleset.conf.j2 +++ b/roles/rsyslog/templates/sc_ruleset.conf.j2 @@ -47,6 +47,8 @@ $RuleSet {{ item.name }} {% for stepupapp in stepupapps %} :programname, isequal, "stepup-{{ stepupapp }}" { action(type="omfile" DynaFile="stepup-{{ stepupapp }}-{{item.name }}") stop } :programname, isequal, "Apache-{{ stepupapp }}" { action(type="omfile" DynaFile="apache-{{ stepupapp }}-{{item.name }}") stop } +if $programname == "{{ stepupapp }}" and $msg startswith " {{ stepupapp }}" then { action(type="omfile" DynaFile="apache-{{ stepupapp }}-{{item.name }}") stop } +:programname, isequal, "{{ stepupapp }}" { action(type="omfile" DynaFile="stepup-{{ stepupapp }}-{{item.name }}") stop } {% endfor %} :programname, isequal, "stepup-authentication" { action(type="omfile" DynaFile="stepup-authentication-{{ item.name }}") stop } {% endif %}