...
Code Block |
---|
title | /etc/syslog-ng/syslog-ng.conf |
---|
|
..
options {
..
use_fqdn(yes);
..
..
};
..
# define local source for logging
source local {
unix-dgram("/var/run/log");
udp(ip(127.0.0.1) port(514));
internal();
};
..
# define destination loghost
destination loghost {
tcp("10.0.0.13" port(514));
};
..
# define a filter
filter notdebug {
level(info...emerg);
};
..
# now define the log
log {
source(local);
filter(notdebug);
destination(loghost);
};
..
|
Sample syslog-ng.conf file attached.
Step 2. Setup a syslog server
...
Code Block |
---|
title | /etc/sysconfig/syslog |
---|
|
SYSLOGD_OPTIONS="-m 0"
|
to:
Code Block |
---|
title | /etc/sysconfig/syslog |
---|
|
SYSLOGD_OPTIONS="-m 0 -r -x"
|
...