use tcp to sync log
Change-Id: I33bd535d44a324e5d00b109b29eb489136ee1c33
This commit is contained in:
parent
3ced15e707
commit
0570b42764
@ -1,5 +1,6 @@
|
|||||||
cat << EOL > /etc/rsyslog.conf
|
cat << EOL > /etc/rsyslog.conf
|
||||||
#### MODULES ####
|
\#\#\#\# MODULES \#\#\#\##
|
||||||
|
|
||||||
\\$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
|
\\$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
|
||||||
\\$ModLoad imfile
|
\\$ModLoad imfile
|
||||||
|
|
||||||
@ -10,43 +11,51 @@ cat << EOL > /etc/rsyslog.conf
|
|||||||
\\$ActionQueueSaveOnShutDown on
|
\\$ActionQueueSaveOnShutDown on
|
||||||
*.* @@$server:514
|
*.* @@$server:514
|
||||||
|
|
||||||
# Provides UDP syslog reception
|
\# Provides UDP syslog reception
|
||||||
\\$ModLoad imudp
|
\#\\$ModLoad imudp
|
||||||
\\$UDPServerRun 514
|
\#\\$UDPServerRun 514
|
||||||
|
|
||||||
# Provides TCP syslog reception
|
\# Provides TCP syslog reception
|
||||||
\\$ModLoad imtcp
|
\\$ModLoad imtcp
|
||||||
\\$InputTCPServerRun 514
|
\\$InputTCPServerRun 514
|
||||||
#set system_name = $getVar('system_name','')
|
#set system_name = $getVar('system_name','')
|
||||||
\\$LocalHostName $system_name
|
\\$LocalHostName $system_name
|
||||||
|
|
||||||
#### GLOBAL DIRECTIVES ####
|
\#\#\#\# GLOBAL DIRECTIVES \#\#\#\##
|
||||||
|
|
||||||
# Use default timestamp format
|
\# Use default timestamp format
|
||||||
\\$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
\\$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||||
|
|
||||||
# File syncing capability is disabled by default. This feature is usually not required,
|
\# File syncing capability is disabled by default. This feature is usually not required,
|
||||||
# not useful and an extreme performance hit
|
\# not useful and an extreme performance hit
|
||||||
#$ActionFileEnableSync on
|
\#\\$ActionFileEnableSync on
|
||||||
|
|
||||||
# Include all config files in /etc/rsyslog.d/
|
\# Include all config files in /etc/rsyslog.d/
|
||||||
\\$IncludeConfig /etc/rsyslog.d/*.conf
|
\\$IncludeConfig /etc/rsyslog.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
#### RULES ####
|
\#\#\#\# RULES \#\#\#\##
|
||||||
|
|
||||||
|
\# Log anything (except mail) of level info or higher.
|
||||||
|
\# Don't log private authentication messages!
|
||||||
|
syslog.*,daemon.* /var/log/messages
|
||||||
|
|
||||||
|
\# The authpriv file has restricted access.
|
||||||
|
authpriv.* /var/log/secure
|
||||||
|
|
||||||
|
\# Log all the mail messages in one place.
|
||||||
mail.* -/var/log/maillog
|
mail.* -/var/log/maillog
|
||||||
|
|
||||||
# Log cron stuff
|
\# Log cron stuff
|
||||||
cron.* /var/log/cron
|
cron.* /var/log/cron
|
||||||
|
|
||||||
# Everybody gets emergency messages
|
\# Everybody gets emergency messages
|
||||||
*.emerg *
|
*.emerg *
|
||||||
|
|
||||||
# Save news errors of level crit and higher in a special file.
|
\# Save news errors of level crit and higher in a special file.
|
||||||
uucp,news.crit /var/log/spooler
|
uucp,news.crit /var/log/spooler
|
||||||
|
|
||||||
# Save boot messages also to boot.log
|
\# Save boot messages also to boot.log
|
||||||
local7.* /var/log/boot.log
|
local7.* /var/log/boot.log
|
||||||
|
|
||||||
EOL
|
EOL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user