diff --git a/dockers/docker-base/etc/rsyslog.conf b/dockers/docker-base/etc/rsyslog.conf index cf5509a3e8..863c11d8c1 100644 --- a/dockers/docker-base/etc/rsyslog.conf +++ b/dockers/docker-base/etc/rsyslog.conf @@ -63,6 +63,10 @@ $WorkDirectory /var/spool/rsyslog # $IncludeConfig /etc/rsyslog.d/*.conf +# +# Suppress duplicate messages and report "message repeated n times" +# +$RepeatedMsgReduction on ############### #### RULES #### diff --git a/files/image_config/rsyslog/rsyslog.conf.j2 b/files/image_config/rsyslog/rsyslog.conf.j2 index 063f119f6b..e714fcec5a 100644 --- a/files/image_config/rsyslog/rsyslog.conf.j2 +++ b/files/image_config/rsyslog/rsyslog.conf.j2 @@ -64,6 +64,10 @@ $WorkDirectory /var/spool/rsyslog # $IncludeConfig /etc/rsyslog.d/*.conf +# +# Suppress duplicate messages and report "message repeated n times" +# +$RepeatedMsgReduction on ############### #### RULES #### diff --git a/platform/p4/docker-sonic-p4/Dockerfile.j2 b/platform/p4/docker-sonic-p4/Dockerfile.j2 index 09849a7ae1..4988cbdb53 100644 --- a/platform/p4/docker-sonic-p4/Dockerfile.j2 +++ b/platform/p4/docker-sonic-p4/Dockerfile.j2 @@ -71,7 +71,6 @@ RUN sed -ri 's/^(save .*$)/# \1/g; ' /etc/redis/redis.conf ADD port_config.ini /port_config.ini -ADD rsyslog.conf /etc/rsyslog.conf COPY ["start.sh", "orchagent.sh", "config_bm.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/configdb-load.sh", "/usr/bin/"] diff --git a/platform/p4/docker-sonic-p4/rsyslog.conf b/platform/p4/docker-sonic-p4/rsyslog.conf deleted file mode 100644 index 79926a8b30..0000000000 --- a/platform/p4/docker-sonic-p4/rsyslog.conf +++ /dev/null @@ -1,69 +0,0 @@ -############################################################################### -# Managed by Ansible -# file: ansible/roles/acs/templates/rsyslog.conf.j2 -############################################################################### -# -# /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 -#$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 -#*.* @172.17.0.1:514 -#Set local syslog -*.* /var/log/messages - -# -# 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 - - -############### -#### RULES #### -###############