Created
March 19, 2018 21:06
-
-
Save MHMDhub/56bf4a2e929d490c8abe1c9ca9488b0c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Centralized log management on Centos7: | |
Two Linux servers ( server @ ip 192.168.0.105 and client @ ip 192.168.0.104). | |
Server setup (Assuming rsyslog package is installed): | |
[root@server ~]# vi /etc/rsyslog.conf # Provides UDP syslog reception$ModLoad imudp$UDPServerRun 514 # Provides TCP syslog reception$ModLoad imtcp$InputTCPServerRun 514 [root@server ~]# service rsyslog restart Verify the syslog server listening. | |
[root@server ~]# netstat -antup | grep 514 tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 8081/rsyslogdtcp 0 0 :::514 :::* LISTEN 8081/rsyslogdudp 0 0 0.0.0.0:514 0.0.0.0:* 8081/rsyslogdudp 0 0 :::514 :::* 8081/rsyslogd | |
Client setup: | |
[root@client ~]# vi /etc/rsyslog.conf At the end of file place the following line to point the client message log to the server | |
*.info;mail.none;authpriv.none;cron.none @192.168.0.105 | |
You can either mention hostname or ip address. | |
Restart the syslog service | |
[root@client ~]# service rsyslog restart Now all the message logs are sent to the central server and also it keeps the copy locally. | |
Firewall Port opening (Optional): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment