
Appendix A – Application Examples and How to Use Remote Syslog
Multi-Tech RouteFinder RF650VPN User Guide
202
Syslog Sample 3
To log the kernel messages to one file and all the other log information to another file:
# sample syslog-ng.conf file, all syslog messages of karl2 and the
# expression ´kernel´ will be written to /var/log/karls2_kern all
# other messages of karl2 will be dumped to /var/log/karl2_stuff
options { sync (0);
time_reopen (10);
log_fifo_size (1000);
long_hostnames (off);
use_dns (no);
use_fqdn (no);
create_dirs (no);
keep_hostname (yes);
};
source s_sys { unix-stream ("/dev/log"); internal();
udp (ip(0.0.0.0) port(514)); };
destination karl2_kern { file("/var/log/karl2_kern"); };
destination karl2_stuff { file("/var/log/karl2_stuff"); };
filter filter_karl2_kern { host("192.168.2.157") and match("kernel");};
filter filter_karl2_stuff { host("192.168.2.157") and not match("kernel"); };
log { source(s_sys); filter(filter_karl2_kern); destination(karl2_kern); };
log { source(s_sys); filter(filter_karl2_stuff); destination(karl2_stuff); };