Skip to content

Commit 4059958

Browse files
committed
[rsyslog]: Remote logging with the highest rule priority
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
1 parent 5b081a8 commit 4059958

File tree

1 file changed

+28
-33
lines changed

1 file changed

+28
-33
lines changed

files/image_config/rsyslog/rsyslog.conf.j2

+28-33
Original file line numberDiff line numberDiff line change
@@ -64,42 +64,9 @@ template(name="WelfRemoteFormat" type="string" string="%TIMESTAMP% id=firewall t
6464
:::date-year%-%timereported:::date-month%-%timereported:::date-day% %timereported:::date-hour%:%timereported:::date-minute%:%timereported\
6565
:::date-second%\" fw=\"{{ fw_name }}\" pri=%syslogpriority% msg=\"%syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\"\n")
6666

67-
#
68-
# Set the default permissions for all log files.
69-
#
70-
$FileOwner root
71-
$FileGroup adm
72-
$FileCreateMode 0640
73-
$DirCreateMode 0755
74-
$Umask 0022
75-
76-
#
77-
# Where to place spool and state files
78-
#
79-
$WorkDirectory /var/spool/rsyslog
80-
81-
#
82-
# Include all config files in /etc/rsyslog.d/
83-
#
84-
$IncludeConfig /etc/rsyslog.d/*.conf
85-
86-
#
87-
# Suppress duplicate messages and report "message repeated n times"
88-
#
89-
$RepeatedMsgReduction on
90-
91-
###############
92-
#### RULES ####
93-
###############
94-
9567
#
9668
# Remote syslog logging
9769
#
98-
99-
# The omfwd plug-in provides the core functionality of traditional message
100-
# forwarding via UDP and plain TCP. It is a built-in module that does not need
101-
# to be loaded.
102-
10370
{% set servers = SYSLOG_SERVER | d({}) -%}
10471
{% for server in servers %}
10572
{% set conf = servers[server] | d({}) -%}
@@ -134,3 +101,31 @@ $RepeatedMsgReduction on
134101
*.{{ severity }}
135102
action(type="omfwd" Target="{{ server }}" Port="{{ port }}" Protocol="{{ proto }}" Template="{{ template }}"{{ options }})
136103
{% endfor %}
104+
105+
#
106+
# Set the default permissions for all log files.
107+
#
108+
$FileOwner root
109+
$FileGroup adm
110+
$FileCreateMode 0640
111+
$DirCreateMode 0755
112+
$Umask 0022
113+
114+
#
115+
# Where to place spool and state files
116+
#
117+
$WorkDirectory /var/spool/rsyslog
118+
119+
#
120+
# Include all config files in /etc/rsyslog.d/
121+
#
122+
$IncludeConfig /etc/rsyslog.d/*.conf
123+
124+
#
125+
# Suppress duplicate messages and report "message repeated n times"
126+
#
127+
$RepeatedMsgReduction on
128+
129+
###############
130+
#### RULES ####
131+
###############

0 commit comments

Comments
 (0)