Rsyslog: Difference between revisions
Content added Content deleted
m (Protected "Rsyslog" ([Edit=Allow only logged in users] (indefinite) [Move=Allow only logged in users] (indefinite) [Delete=Allow only logged in users] (indefinite))) |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:Linux]] |
|||
⚫ | |||
__TOC__ |
|||
<br /> |
|||
⚫ | |||
Rsyslog will be installed by default in Latest Ubuntu server. |
Rsyslog will be installed by default in Latest Ubuntu server. |
Revision as of 17:56, 15 July 2017
Syslog Server
Rsyslog will be installed by default in Latest Ubuntu server. Install it if it is not already installed:
sudo apt-get install rsyslog
Edit the Rsyslog config file
sudo nano /etc/rsyslog.conf
# provides UDP syslog reception $ModLoad imudp $UDPServerRun 514
# provides TCP syslog reception $ModLoad imtcp $InputTCPServerRun 514
Restart rsyslog service
sudo service rsyslog restart
Verify if the Server listens to this port
netstat -an | grep 514
Validate your rsyslog configuration file:
sudo rsyslogd -N1
Syslog Client
On the Client Machine:
sudo nano /etc/rsyslog.d/50-default.conf
Add the following line at the top of the file before the log by facility section, :
/etc/rsyslog.d/50-default.conf
*.* @10.107.88.93:514
Restart rsyslog service
sudo service rsyslog restart
Verification:
logger -p local4.info "This is a info message from local 4"