Difference between revisions of "Rsyslog Server"

From The Linux Source
Jump to: navigation, search
(Created page with "1. Save original version of rsyslog.conf<br> Note: do not overwrite if rsyslog.conf-original already exists, it should already be there from the company image, so this step is...")
 
m
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
1. Save original version of rsyslog.conf<br>
+
PARENT PAGE LINK: [[Syslog]]
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. Update /etc/rsyslog.conf<br>
+
 
Make sure the following is enabled/uncommented;
+
1. See generic [[Rsyslog]] page for other config options
# Use traditional timestamp format
+
 
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+
2. Update /etc/rsyslog.conf, add the following line to end of ModLoad/MODULES section to enable the desired server mode
Add the following line to end of ModLoad/MODULES section;
+
UDP:
 
  # UDP server module
 
  # UDP server module
 
  $ModLoad imudp
 
  $ModLoad imudp
 
  # enable UDP server and port
 
  # enable UDP server and port
 
  $UDPServerRun 514
 
  $UDPServerRun 514
Add the following line to the beginning of the logging/RULES section (before #kern.* line);
+
OR TCP:
  # log all to mySql
+
# TCP server module
  *.*      :ommysql:127.0.0.1,Syslog,syslog-insert,somepwA
+
$ModLoad imtcp                                                                 
 +
  # enable TCP server and port
 +
  $InputTCPServerRun 514                                                         
  
 
3. Restart rsyslog service
 
3. Restart rsyslog service
 
  ENT 7
 
  ENT 7
  # systemctl start rsyslog
+
  # systemctl restart rsyslog
 
  BEFORE Ent 7
 
  BEFORE Ent 7
 
  # service rsyslog restart
 
  # service rsyslog restart

Latest revision as of 12:20, 12 June 2017

PARENT PAGE LINK: Syslog


1. See generic Rsyslog page for other config options

2. Update /etc/rsyslog.conf, 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                                                          

3. Restart rsyslog service

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