fde8c1
# rsyslog configuration file
fde8c1
fde8c1
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
fde8c1
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
fde8c1
fde8c1
#### MODULES ####
fde8c1
fde8c1
# The imjournal module bellow is now used as a message source instead of imuxsock.
fde8c1
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
fde8c1
$ModLoad imjournal # provides access to the systemd journal
fde8c1
#$ModLoad imklog # reads kernel messages (the same are read from journald)
fde8c1
#$ModLoad immark  # provides --MARK-- message capability
fde8c1
fde8c1
# Provides UDP syslog reception
fde8c1
#$ModLoad imudp
fde8c1
#$UDPServerRun 514
fde8c1
fde8c1
# Provides TCP syslog reception
fde8c1
#$ModLoad imtcp
fde8c1
#$InputTCPServerRun 514
fde8c1
fde8c1
fde8c1
#### GLOBAL DIRECTIVES ####
fde8c1
fde8c1
# Where to place auxiliary files
fde8c1
$WorkDirectory /var/lib/rsyslog
fde8c1
fde8c1
# Use default timestamp format
fde8c1
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
fde8c1
fde8c1
# File syncing capability is disabled by default. This feature is usually not required,
fde8c1
# not useful and an extreme performance hit
fde8c1
#$ActionFileEnableSync on
fde8c1
fde8c1
# Include all config files in /etc/rsyslog.d/
fde8c1
$IncludeConfig /etc/rsyslog.d/*.conf
fde8c1
fde8c1
# Turn off message reception via local log socket;
fde8c1
# local messages are retrieved through imjournal now.
fde8c1
$OmitLocalLogging on
fde8c1
fde8c1
# File to store the position in the journal
fde8c1
$IMJournalStateFile imjournal.state
fde8c1
fde8c1
fde8c1
#### RULES ####
fde8c1
fde8c1
# Log all kernel messages to the console.
fde8c1
# Logging much else clutters up the screen.
fde8c1
#kern.*                                                 /dev/console
fde8c1
fde8c1
# Log anything (except mail) of level info or higher.
fde8c1
# Don't log private authentication messages!
fde8c1
*.info;mail.none;authpriv.none;cron.none                /var/log/messages
fde8c1
fde8c1
# The authpriv file has restricted access.
fde8c1
authpriv.*                                              /var/log/secure
fde8c1
fde8c1
# Log all the mail messages in one place.
fde8c1
mail.*                                                  -/var/log/maillog
fde8c1
fde8c1
fde8c1
# Log cron stuff
fde8c1
cron.*                                                  /var/log/cron
fde8c1
fde8c1
# Everybody gets emergency messages
fde8c1
*.emerg                                                 :omusrmsg:*
fde8c1
fde8c1
# Save news errors of level crit and higher in a special file.
fde8c1
uucp,news.crit                                          /var/log/spooler
fde8c1
fde8c1
# Save boot messages also to boot.log
fde8c1
local7.*                                                /var/log/boot.log
fde8c1
fde8c1
fde8c1
# ### begin forwarding rule ###
fde8c1
# The statement between the begin ... end define a SINGLE forwarding
fde8c1
# rule. They belong together, do NOT split them. If you create multiple
fde8c1
# forwarding rules, duplicate the whole block!
fde8c1
# Remote Logging (we use TCP for reliable delivery)
fde8c1
#
fde8c1
# An on-disk queue is created for this action. If the remote host is
fde8c1
# down, messages are spooled to disk and sent when it is up again.
fde8c1
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
fde8c1
#$ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible)
fde8c1
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
fde8c1
#$ActionQueueType LinkedList   # run asynchronously
fde8c1
#$ActionResumeRetryCount -1    # infinite retries if host is down
fde8c1
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
fde8c1
#*.* @@remote-host:514
fde8c1
# ### end of the forwarding rule ###