diff options
author | Christian Breunig <christian@breunig.cc> | 2023-05-08 21:27:14 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-05-08 22:45:53 +0200 |
commit | 1dc79cebc6d27a8f9d2f9ca9c2e0f2fd0809d940 (patch) | |
tree | 74b294e319ebad8c046756e91ce0f17a32fdcb3e /src/etc | |
parent | 43b4d30ed0298565ce7cf891fbd72c5a7484dac6 (diff) | |
download | vyos-1x-1dc79cebc6d27a8f9d2f9ca9c2e0f2fd0809d940.tar.gz vyos-1x-1dc79cebc6d27a8f9d2f9ca9c2e0f2fd0809d940.zip |
syslog: T2778: migrate to get_config_dict()
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/rsyslog.conf | 61 | ||||
-rw-r--r-- | src/etc/rsyslog.d/01-auth.conf | 14 |
2 files changed, 61 insertions, 14 deletions
diff --git a/src/etc/rsyslog.conf b/src/etc/rsyslog.conf new file mode 100644 index 000000000..706ebb60d --- /dev/null +++ b/src/etc/rsyslog.conf @@ -0,0 +1,61 @@ +################# +#### MODULES #### +################# + +$ModLoad imuxsock # provides support for local system logging +$ModLoad imklog # provides kernel logging support (previously done by rklogd) +#$ModLoad immark # provides --MARK-- message capability + +$OmitLocalLogging off +$SystemLogSocketName /run/systemd/journal/syslog + +$KLogPath /proc/kmsg + +########################### +#### GLOBAL DIRECTIVES #### +########################### + +# The lines below cause all listed daemons/processes to be logged into +# /var/log/auth.log, then drops the message so it does not also go to the +# regular syslog so that messages are not duplicated + +$outchannel auth_log,/var/log/auth.log +if $programname == 'CRON' or + $programname == 'sudo' or + $programname == 'su' + then :omfile:$auth_log + +if $programname == 'CRON' or + $programname == 'sudo' or + $programname == 'su' + then stop + +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# A modern-style logfile format similar to TraditionalFileFormat, buth with high-precision timestamps and timezone information +#$ActionFileDefaultTemplate RSYSLOG_FileFormat +# The "old style" default log file format with low-precision timestamps +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat + +# Filter duplicated messages +$RepeatedMsgReduction on + +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 + +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf + +############### +#### RULES #### +############### +# Emergencies are sent to everybody logged in. +*.emerg :omusrmsg:*
\ No newline at end of file diff --git a/src/etc/rsyslog.d/01-auth.conf b/src/etc/rsyslog.d/01-auth.conf deleted file mode 100644 index cc64099d6..000000000 --- a/src/etc/rsyslog.d/01-auth.conf +++ /dev/null @@ -1,14 +0,0 @@ -# The lines below cause all listed daemons/processes to be logged into -# /var/log/auth.log, then drops the message so it does not also go to the -# regular syslog so that messages are not duplicated - -$outchannel auth_log,/var/log/auth.log -if $programname == 'CRON' or - $programname == 'sudo' or - $programname == 'su' - then :omfile:$auth_log - -if $programname == 'CRON' or - $programname == 'sudo' or - $programname == 'su' - then stop |