how to send logs to other server

General support questions
Post Reply
mrnico
Posts: 2
Joined: 2011/08/16 14:08:49

how to send logs to other server

Post by mrnico » 2011/08/16 14:14:28

Hello, few days ago I installed CentOS 6.0 with no problem, now I need to configure this server to send system logs to my server logs. How do I do this?

keithwright
Posts: 16
Joined: 2011/08/01 18:53:57
Contact:

how to send logs to other server

Post by keithwright » 2011/08/17 17:57:06

With the new release replacing syslog with rsyslog, this has changed from in the past.
Instead of configuring /etc/sysconfig/syslog file to receive log packets, this is now done in the /etc/rsyslog.conf.

If you want to receive packets on a machine using the traditional UDP port 514, then uncomment these lines below
# Provides UDP syslog reception:
$ModLoad imudp.so
$UDPServerRun 514

Then on the machine to send packets over UDP 514, you would add to /etc/rsyslog,.conf a line like:

*.* @192.168.10.100

where 192.168.10.100 would be the address of the machine to receive packets.

On the other hand if you want to receive the packets over the more reliable TCP port 514, then you would uncomment the two lines below
# Provides TCP syslog reception:
$ModLoad imtcp.so
$InputTCPServerRun 514

Then on the machine to send packets over TCP 514, you would add to /etc/rsyslog,.conf a line like:

*.* @@192.168.10.100

where 192.168.10.100 would be the address of the machine to receive packets.

Remember to restart the rsyslog service on each machine, and add the appropriate rule to your firewall if necessary.

Post Reply