Difference between revisions of "Rsyslog Server"

From The Linux Source
Jump to: navigation, search
m
Line 2: Line 2:
  
  
1. Save original version of rsyslog.conf<br>
+
1. See generic [[Rsyslog]] page for other config options
Note: do not overwrite if rsyslog.conf-original already exists, it should already be there from the company image, so this step is normally skipped
+
# cp -p /etc/rsyslog.conf /etc/rsyslog.conf-original
+
  
2. See generic [[Rsyslog]] page for other config options
+
2. Update /etc/rsyslog.conf<br>
 
+
2a. Add the following line to end of ModLoad/MODULES section to enable the desired server mode
3. Update /etc/rsyslog.conf<br>
+
3a. Add the following line to end of ModLoad/MODULES section to enable the desired server mode
+
 
  UDP:
 
  UDP:
 
  # UDP server module
 
  # UDP server module
Line 20: Line 16:
 
  # enable TCP server and port
 
  # enable TCP server and port
 
  $InputTCPServerRun 514                                                           
 
  $InputTCPServerRun 514                                                           
3b. Add the following line to the beginning of the logging/RULES section (before #kern.* line);
+
2b. Add the following line to the beginning of the logging/RULES section (before #kern.* line);
 
  # log all to mySql
 
  # log all to mySql
 
  *.*      :ommysql:127.0.0.1,Syslog,syslog-insert,somepwA
 
  *.*      :ommysql:127.0.0.1,Syslog,syslog-insert,somepwA
  
4. Restart rsyslog service
+
3. Restart rsyslog service
 
  ENT 7
 
  ENT 7
 
  # systemctl start rsyslog
 
  # systemctl start rsyslog
 
  BEFORE Ent 7
 
  BEFORE Ent 7
 
  # service rsyslog restart
 
  # service rsyslog restart

Revision as of 16:53, 22 May 2017

PARENT PAGE LINK: Syslog


1. See generic Rsyslog page for other config options

2. Update /etc/rsyslog.conf
2a. Add the following line to end of ModLoad/MODULES section to enable the desired server mode

UDP:
# UDP server module
$ModLoad imudp
# enable UDP server and port
$UDPServerRun 514
OR TCP:
# TCP server module
$ModLoad imtcp                                                                  
# enable TCP server and port
$InputTCPServerRun 514                                                          

2b. Add the following line to the beginning of the logging/RULES section (before #kern.* line);

# log all to mySql
*.*       :ommysql:127.0.0.1,Syslog,syslog-insert,somepwA

3. Restart rsyslog service

ENT 7
# systemctl start rsyslog
BEFORE Ent 7
# service rsyslog restart