FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


middleware:rsyslog:syslog-server.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
middleware:rsyslog:syslog-server.html [2018/01/28 01:40]
kurihara
middleware:rsyslog:syslog-server.html [2018/04/19 00:11] (current)
kurihara
Line 10: Line 10:
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 +#=============================================================
 #### 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 imjournal # provides access to the systemd journal $ModLoad imjournal # provides access to the systemd journal
  
 +## Syslog Serfer
 +# Provides UDP syslog reception
 +$ModLoad imudp
 +$UDPServerRun 514
 +
 +# Provides TCP syslog reception
 +$ModLoad imtcp
 +$InputTCPServerRun 514
 +
 +#=============================================================
 #### GLOBAL DIRECTIVES #### #### GLOBAL DIRECTIVES ####
 +#=============================================================
 $WorkDirectory /var/lib/rsyslog $WorkDirectory /var/lib/rsyslog
 $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
Line 23: Line 35:
 $IMJournalStateFile imjournal.state $IMJournalStateFile imjournal.state
  
 +# Syslog Server
 +$umask 0022
 +$FileCreateMode 0644
 +$DirCreateMode 0755
 +
 +#=============================================================
 #### RULES #### #### RULES ####
 +# Rules are applied sequentially from the top
 +#=============================================================
 +# Syslog Server Rule
 +$template RemoteHost, "/var/log/rsyslog/%$year%/%$month%/%$day%/%hostname%.%$year%%$month%%$day%.log"
 +:fromhost-ip, !isequal, "127.0.0.1" -?RemoteHost
 +& ~
 +
 +# Default Rule
 *.info;mail.none;authpriv.none;cron.none                /var/log/messages *.info;mail.none;authpriv.none;cron.none                /var/log/messages
 authpriv.*                                              /var/log/secure authpriv.*                                              /var/log/secure
Line 32: Line 58:
 local7.*                                                /var/log/boot.log local7.*                                                /var/log/boot.log
  
-#=========================================== 
-# Syslog Server 
-#=========================================== 
-# Provides UDP syslog reception 
-$ModLoad imudp 
-$UDPServerRun 514 
  
-Provides TCP syslog reception +Max messages is 10000 messages in 30 seconds 
-$ModLoad imtcp +# you must change /etc/systemd/journald.conf. 
-$InputTCPServerRun 514+$imjournalRatelimitInterval 30 
 +$imjournalRatelimitBurst 10000 
 +</sxh>
  
-$umask 0022 
-$FileCreateMode 0644 
-$DirCreateMode 0755 
  
 +\\
 +\\
 +===== Note =====
 +==== Template ====
 +
 +<sxh bash toolbar:false gutter:false>
 # Template name is RemoteHost # Template name is RemoteHost
 $template RemoteHost, "/var/log/rsyslog/%hostname%/%hostname%.%$year%%$month%%$day%.log" $template RemoteHost, "/var/log/rsyslog/%hostname%/%hostname%.%$year%%$month%%$day%.log"
Line 53: Line 78:
 </sxh> </sxh>
  
- 
-\\ 
-\\ 
-===== Note ===== 
-==== Template ==== 
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 # Template name is RemoteHost # Template name is RemoteHost
Line 86: Line 106:
 </sxh> </sxh>
  
 +\\
 +<WRAP box 90%>
 +<catlist -noAddPageButton -smallHead -sortAscending>
 +</WRAP>
  
 \\ \\
 \\ \\
 [[middleware:rsyslog:index.html|]] [[middleware:rsyslog:index.html|]]


middleware/rsyslog/syslog-server.html.1517071201.txt.gz · Last modified: 2018/01/28 01:40 by kurihara