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