000b35
# rsyslog configuration file
000b35
000b35
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
000b35
# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html 
000b35
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
000b35
000b35
#### GLOBAL DIRECTIVES ####
000b35
000b35
# Where to place auxiliary files
000b35
global(workDirectory="/var/lib/rsyslog")
000b35
000b35
# Use default timestamp format
000b35
module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat")
000b35
000b35
# Include all config files in /etc/rsyslog.d/
000b35
include(file="/etc/rsyslog.d/*.conf" mode="optional")
000b35
000b35
#### MODULES ####
000b35
000b35
module(load="imuxsock" 	  # provides support for local system logging (e.g. via logger command)
000b35
       SysSock.Use="off") # Turn off message reception via local log socket; 
000b35
			  # local messages are retrieved through imjournal now.
000b35
module(load="imjournal" 	    # provides access to the systemd journal
000b35
       StateFile="imjournal.state") # File to store the position in the journal
000b35
#module(load="imklog") # reads kernel messages (the same are read from journald)
000b35
#module(load="immark") # provides --MARK-- message capability
000b35
000b35
# Provides UDP syslog reception
000b35
# for parameters see http://www.rsyslog.com/doc/imudp.html
000b35
#module(load="imudp") # needs to be done just once
000b35
#input(type="imudp" port="514")
000b35
000b35
# Provides TCP syslog reception
000b35
# for parameters see http://www.rsyslog.com/doc/imtcp.html
000b35
#module(load="imtcp") # needs to be done just once
000b35
#input(type="imtcp" port="514")
000b35
000b35
#### RULES ####
000b35
000b35
# Log all kernel messages to the console.
000b35
# Logging much else clutters up the screen.
000b35
#kern.*                                                 /dev/console
000b35
000b35
# Log anything (except mail) of level info or higher.
000b35
# Don't log private authentication messages!
000b35
*.info;mail.none;authpriv.none;cron.none                /var/log/messages
000b35
000b35
# The authpriv file has restricted access.
000b35
authpriv.*                                              /var/log/secure
000b35
000b35
# Log all the mail messages in one place.
000b35
mail.*                                                  -/var/log/maillog
000b35
000b35
000b35
# Log cron stuff
000b35
cron.*                                                  /var/log/cron
000b35
000b35
# Everybody gets emergency messages
000b35
*.emerg                                                 :omusrmsg:*
000b35
000b35
# Save news errors of level crit and higher in a special file.
000b35
uucp,news.crit                                          /var/log/spooler
000b35
000b35
# Save boot messages also to boot.log
000b35
local7.*                                                /var/log/boot.log
000b35
000b35
000b35
# ### sample forwarding rule ###
000b35
#action(type="omfwd"  
000b35
# # An on-disk queue is created for this action. If the remote host is
000b35
# # down, messages are spooled to disk and sent when it is up again.
000b35
#queue.filename="fwdRule1"       # unique name prefix for spool files
000b35
#queue.maxdiskspace="1g"         # 1gb space limit (use as much as possible)
000b35
#queue.saveonshutdown="on"       # save messages to disk on shutdown
000b35
#queue.type="LinkedList"         # run asynchronously
000b35
#action.resumeRetryCount="-1"    # infinite retries if host is down
000b35
# # Remote Logging (we use TCP for reliable delivery)
000b35
# # remote_host is: name/ip, e.g. 192.168.0.1, port optional e.g. 10514
000b35
#Target="remote_host" Port="XXX" Protocol="tcp")