Logging data with syslog-ng
Introduction
Syslog-ng ("New
generation") is an enhanced alternative to the venerable syslog
server.
Setup
- /etc/rc.d/init.d/syslog stop
- chkconfig syslog off
- yum install syslog-ng
- chkconfig syslog-ng on
- vi /etc/syslog-ng/syslog-ng.conf:
source s_network {
tcp(max-connections(5000));
udp();
};
destination
d_network {
file
("/var/log/syslog-ng/$HOST.log");
};
filter f_filter10
{ level(info..emerg); };
log { source(s_network);
filter(f_filter10);
destination(d_network);
};
- mkdir /var/log/syslog-ng/
- tail -f /var/log/syslog-ng/192.168.0.253.log
Resources