compass-adapters/cobbler/snippets/kickstart_rsyslog.conf
Jerry Zhao 1349af2356 enable system log /var/log/messages
Change-Id: I4a6510e0d092991aef17b6ec496bb236ee5cc846
2014-08-21 19:18:09 -07:00

54 lines
1.5 KiB
Plaintext

cat << EOL > /etc/rsyslog.conf
#### MODULES ####
\\$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
\\$ModLoad imfile
\\$WorkDirectory /var/lib/rsyslog
\\$ActionQueueType LinkedList
\\$ActionQueueFileName srvrfwd
\\$ActionResumeRetryCount -1
\\$ActionQueueSaveOnShutDown on
*.* @@$server:514
# Provides UDP syslog reception
\\$ModLoad imudp
\\$UDPServerRun 514
# Provides TCP syslog reception
\\$ModLoad imtcp
\\$InputTCPServerRun 514
#set system_name = $getVar('system_name','')
\\$LocalHostName $system_name
#### GLOBAL DIRECTIVES ####
# Use default timestamp format
\\$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on
# Include all config files in /etc/rsyslog.d/
\\$IncludeConfig /etc/rsyslog.d/*.conf
#### RULES ####
syslog.*,daemon.* /var/log/messages
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
EOL
chkconfig rsyslog on