2019-01-31 01:05:52 -06:00
|
|
|
#
|
|
|
|
# /etc/rsyslog.conf Configuration file for rsyslog.
|
|
|
|
#
|
|
|
|
# For more information see
|
|
|
|
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
|
|
|
|
|
|
|
|
|
|
|
|
#################
|
|
|
|
#### MODULES ####
|
|
|
|
#################
|
|
|
|
|
|
|
|
$ModLoad imuxsock # provides support for local system logging
|
2019-03-04 13:46:48 -06:00
|
|
|
|
|
|
|
#
|
2020-10-20 13:52:46 -05:00
|
|
|
# Set a rate limit on messages from the container of priority INFO or lower (level 6 and above)
|
2019-03-04 13:46:48 -06:00
|
|
|
#
|
|
|
|
$SystemLogRateLimitInterval 300
|
|
|
|
$SystemLogRateLimitBurst 20000
|
2020-10-20 13:52:46 -05:00
|
|
|
$SystemLogRateLimitSeverity 6
|
2019-03-04 13:46:48 -06:00
|
|
|
|
2019-01-31 01:05:52 -06:00
|
|
|
#$ModLoad imklog # provides kernel logging support
|
|
|
|
#$ModLoad immark # provides --MARK-- message capability
|
|
|
|
|
|
|
|
# provides UDP syslog reception
|
|
|
|
#$ModLoad imudp
|
|
|
|
#$UDPServerRun 514
|
|
|
|
|
|
|
|
# provides TCP syslog reception
|
|
|
|
#$ModLoad imtcp
|
|
|
|
#$InputTCPServerRun 514
|
|
|
|
|
|
|
|
|
|
|
|
###########################
|
|
|
|
#### GLOBAL DIRECTIVES ####
|
|
|
|
###########################
|
|
|
|
|
|
|
|
# Set remote syslog server
|
|
|
|
template (name="ForwardFormatInContainer" type="string" string="<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%")
|
|
|
|
*.* action(type="omfwd" target="127.0.0.1" port="514" protocol="udp" Template="ForwardFormatInContainer")
|
|
|
|
|
|
|
|
#
|
|
|
|
# Use traditional timestamp format.
|
|
|
|
# To enable high precision timestamps, comment out the following line.
|
|
|
|
#
|
|
|
|
#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
|
|
|
|
|
|
|
# Define a custom template
|
|
|
|
$template SONiCFileFormat,"%TIMESTAMP%.%timestamp:::date-subseconds% %HOSTNAME% %syslogseverity-text:::uppercase% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
|
|
|
|
$ActionFileDefaultTemplate SONiCFileFormat
|
|
|
|
|
|
|
|
#
|
|
|
|
# Set the default permissions for all log files.
|
|
|
|
#
|
|
|
|
$FileOwner root
|
|
|
|
$FileGroup adm
|
|
|
|
$FileCreateMode 0640
|
|
|
|
$DirCreateMode 0755
|
|
|
|
$Umask 0022
|
|
|
|
|
|
|
|
#
|
|
|
|
# Where to place spool and state files
|
|
|
|
#
|
|
|
|
$WorkDirectory /var/spool/rsyslog
|
|
|
|
|
|
|
|
#
|
|
|
|
# Include all config files in /etc/rsyslog.d/
|
|
|
|
#
|
|
|
|
$IncludeConfig /etc/rsyslog.d/*.conf
|
|
|
|
|
|
|
|
#
|
|
|
|
# Suppress duplicate messages and report "message repeated n times"
|
|
|
|
#
|
|
|
|
$RepeatedMsgReduction on
|
|
|
|
|
|
|
|
###############
|
|
|
|
#### RULES ####
|
|
|
|
###############
|