#  /etc/rsyslog.conf	Configuration file for rsyslog.
#
#			For more information see
#			/usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
#  Default logging rules can be found in /etc/rsyslog.d/50-default.conf


#################
#### MODULES ####
#################

$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog   # provides kernel logging support (previously done by rklogd)

$KLogPath /proc/kmsg


###### Remote logging input
# Note, binds to all interfaces, allow tcp 10514 only from the management network
$ModLoad imtcp   # For receiving logs over tcp
$InputTCPServerStreamDriverMode 0 # unencrypted
$InputTCPServerStreamDriverAuthMode anon
$InputTCPServerRun 10514

$template DynaFile,”/var/log/node-%HOSTNAME%.log”
*.* -?DynaFile

##### End remote logging



## Disabled -- JFL not use on rsyslog server
# Send all logs to nova-qc
#*.*   @@nova-qc.dair-atir.canarie.ca:10514

# Async IO and disk spooling in case of DB backlogs
$WorkDirectory /var/log			# default location for work (spool) files
$ActionQueueType LinkedList		# use asynchronous processing
$ActionQueueFileName rsyslogspool	# set file name, also enables disk mode
$ActionResumeRetryCount -1		# infinite retries on insert failure


###########################
#### GLOBAL DIRECTIVES ####
###########################

#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# Filter duplicated messages
$RepeatedMsgReduction on

#
# Set the default permissions for all log files.
#
$FileOwner syslog
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser syslog
$PrivDropToGroup syslog

auth,authpriv.*                 /var/log/auth.log
*.*;auth,authpriv.none          /var/log/syslog
#cron.*                         /var/log/cron.log
daemon.*                        /var/log/daemon.log
kern.*                          /var/log/kern.log
lpr.*                           /var/log/lpr.log
mail.*                          /var/log/mail.log
user.*                          /var/log/user.log

#
# Log all the nova events
#
nova*.* 			/var/log/nova/*
	
#
# Logging for the mail system.  Split it up so that
# it is easy to write scripts to parse these files.
#
mail.info                       /var/log/mail.info
mail.warn                       /var/log/mail.warn
mail.err                        /var/log/mail.err


#
# Some "catch-all" log files.
#
*.=debug;\
        auth,authpriv.none;\
        news.none;mail.none     -/var/log/debug
*.=info;*.=notice;*.=warn;\
        auth,authpriv.none;\
        cron,daemon.none;\
        mail,news.none          -/var/log/messages


