v7.3.0.0: Simplify haproxy rsyslog configuration

Removed a specific condition from the rsyslog configuration for haproxy. The condition was initially checking if the input was UDP which was unnecessary. The new configuration continues to correctly categorize logs into access, error, and status files based on their syslog severity.
pull/387/head
Aidaho 2024-06-06 17:26:34 +03:00
parent be262b0e88
commit 923727b7b7
1 changed files with 9 additions and 14 deletions

View File

@ -4,17 +4,12 @@ $UDPServerRun 514
module(load="builtin:omfile")
if ($programname startswith 'haproxy' and $inputname == 'imudp') then {
if $syslogseverity == 6 then {
action(type="omfile" file="/var/log/haproxy/access.log")
stop
}
if $syslogseverity <= 3 then {
action(type="omfile" file="/var/log/haproxy/error.log")
stop
}
if $syslogseverity <= 5 then {
action(type="omfile" file="/var/log/haproxy/status.log"])
stop
}
}
if $programname startswith 'haproxy' then {
if $syslogseverity == 6 then
action(type="omfile" file="/var/log/haproxy/access.log")
if $syslogseverity <= 3 then
action(type="omfile" file="/var/log/haproxy/error.log")
if $syslogseverity <= 5 then
action(type="omfile" file="/var/log/haproxy/status.log")
stop
}