From 34fd72d3df2e4e17f5a9c1425e665875b4daff3e Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Fri, 7 Sep 2018 09:58:42 +0000 Subject: [PATCH] - log dhcp to separate file --- syslog-ng.conf | 5 +++++ syslog-ng.logrotate | 1 + syslog-ng.spec | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/syslog-ng.conf b/syslog-ng.conf index ddded21..8103f11 100644 --- a/syslog-ng.conf +++ b/syslog-ng.conf @@ -55,6 +55,7 @@ destination d_xconsole { pipe("/dev/xconsole"); }; destination d_newscrit { file("/var/log/news/news.crit" owner(news) group(news)); }; destination d_newserr { file("/var/log/news/news.err" owner(news) group(news)); }; destination d_newsnotice { file("/var/log/news/news.notice" owner(news) group(news)); }; +destination d_dhcp { file("/var/log/dhcp"); }; # uncomment the line below if you want to run syslog server #destination d_from_net { file("/var/log/$HOST.log" owner(root) group(root) perm(0644) dir_perm(0700) create_dirs(yes)); }; @@ -96,6 +97,7 @@ filter f_freshclam { program(freshclam); }; filter f_ppp { program(pppd) or program(chat); }; filter f_postgres { program(postgres); }; filter f_shorewall { facility(kern) and match("Shorewall:" value("MESSAGE")); }; +filter f_dhcp { program("dhcpd") or program("dnsmasq-dhcp"); }; # uncomment the line below if you want to run syslog server #log { source(s_net); destination(d_from_net); flags(final); }; @@ -106,6 +108,9 @@ filter f_shorewall { facility(kern) and match("Shorewall:" value("MESSAGE")); }; # log shorewall to separate log file by default log { source(s_sys); filter(f_shorewall); destination(d_shorewall); flags(final); }; +# log dhcp daemons to separate log file by default +log { source(s_sys); filter(f_dhcp); destination(d_dhcp); flags(final); }; + log { source(s_sys); filter(f_authpriv); destination(d_authlog); }; log { source(s_sys); filter(f_cron); destination(d_cron); }; log { source(s_sys); filter(f_daemon); destination(d_daemon); }; diff --git a/syslog-ng.logrotate b/syslog-ng.logrotate index fcf6144..ca99150 100644 --- a/syslog-ng.logrotate +++ b/syslog-ng.logrotate @@ -1,6 +1,7 @@ /var/log/cron /var/log/daemon /var/log/debug +/var/log/dhcp /var/log/iptables /var/log/kernel /var/log/lpr diff --git a/syslog-ng.spec b/syslog-ng.spec index b2fd9fa..cead380 100644 --- a/syslog-ng.spec +++ b/syslog-ng.spec @@ -37,7 +37,7 @@ Summary(pl.UTF-8): Syslog-ng - systemowy demon logujący nowej generacji Summary(pt_BR.UTF-8): Daemon de log nova geração Name: syslog-ng Version: 3.17.2 -Release: 1 +Release: 2 License: GPL v2+ with OpenSSL exception Group: Daemons Source0: https://github.com/balabit/syslog-ng/archive/%{name}-%{version}.tar.gz -- 2.37.3