From d44347bcdc512d7cf5d83baf2b730aa2d873ba01 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Wed, 11 Jul 2018 19:02:44 +0000 Subject: [PATCH] - fix copy-pasto in config, tab cosmetics, rework network sysloging a bit - telegram requires http so it belongs to http subpackage --- syslog-ng.conf | 100 +++++++++++++++++++++++-------------------------- syslog-ng.spec | 4 +- 2 files changed, 48 insertions(+), 56 deletions(-) diff --git a/syslog-ng.conf b/syslog-ng.conf index dfd5fc4..a073b74 100644 --- a/syslog-ng.conf +++ b/syslog-ng.conf @@ -30,38 +30,34 @@ source s_sys { # uncomment the line below and change ip/port if you want to run syslog server #source s_net udp(ip(192.168.1.100),port(514)); -#destination d_loghost { udp("loghost" port(514)); }; - -destination d_kern { file("/var/log/kernel"); }; -destination d_messages { file("/var/log/messages"); }; -destination d_authlog { file("/var/log/secure"); }; -destination d_mail { file("/var/log/maillog"); }; -destination d_uucp { file("/var/log/spooler"); }; -destination d_debug { file("/var/log/debug"); }; -destination d_cron { file("/var/log/cron"); }; -destination d_syslog { file("/var/log/syslog"); }; -destination d_daemon { file("/var/log/daemon"); }; +# uncomment the line bellow if you want to send logs to syslog server +#destination d_loghost { udp("loghost" port(514)); }; + +destination d_kern { file("/var/log/kernel"); }; +destination d_messages { file("/var/log/messages"); }; +destination d_authlog { file("/var/log/secure"); }; +destination d_mail { file("/var/log/maillog"); }; +destination d_uucp { file("/var/log/spooler"); }; +destination d_debug { file("/var/log/debug"); }; +destination d_cron { file("/var/log/cron"); }; +destination d_syslog { file("/var/log/syslog"); }; +destination d_daemon { file("/var/log/daemon"); }; destination d_lpr { file("/var/log/lpr"); }; -destination d_user { file("/var/log/user"); }; +destination d_user { file("/var/log/user"); }; destination d_ppp { file("/var/log/ppp"); }; destination d_ftp { file("/var/log/xferlog"); }; -destination d_audit { file("/var/log/audit"); }; -destination d_postgres { file("/var/log/pgsql"); }; -destination d_freshclam { file("/var/log/freshclam.log"); }; - -destination d_shorewall { file("/var/log/shorewall"); }; - -destination d_console { usertty("root"); }; -#destination d_console_all { file("/dev/tty12"); }; - -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_audit { file("/var/log/audit"); }; +destination d_postgres { file("/var/log/pgsql"); }; +destination d_freshclam { file("/var/log/freshclam.log"); }; +destination d_shorewall { file("/var/log/shorewall"); }; +destination d_console { usertty("root"); }; +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)); }; # 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)); }; +#destination d_from_net { file("/var/log/$HOST.log" owner(root) group(root) perm(0644) dir_perm(0700) create_dirs(yes)); }; # Filters for standard syslog(3) facilities #filter f_audit { facility(audit); }; @@ -104,39 +100,35 @@ filter f_shorewall { facility(kern) and match("Shorewall:" value("MESSAGE")); }; # uncomment the line below if you want to run syslog server #log { source(s_net); destination(d_from_net); flags(final); }; -# log shorewall to separate log file by default -log { source(s_src); filter(f_shorewall); destination(d_shorewall); 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); }; -log { source(s_sys); filter(f_ftp); destination(d_ftp); }; -log { source(s_sys); filter(f_kern); destination(d_kern); }; -log { source(s_sys); filter(f_lpr); destination(d_lpr); }; -log { source(s_sys); filter(f_mail); destination(d_mail); }; -log { source(s_sys); filter(f_news); filter(p_crit); destination(d_uucp); }; -log { source(s_sys); filter(f_news); filter(p_crit); destination(d_newscrit); }; -log { source(s_sys); filter(f_news); filter(p_err); destination(d_newserr); }; -log { source(s_sys); filter(f_news); filter(p_warn); destination(d_newsnotice); }; -log { source(s_sys); filter(f_news); filter(p_notice); destination(d_newsnotice); }; -log { source(s_sys); filter(f_news); filter(p_info); destination(d_newsnotice); }; -log { source(s_sys); filter(f_news); filter(p_debug); destination(d_newsnotice); }; -log { source(s_sys); filter(f_syslog); destination(d_syslog); }; -log { source(s_sys); filter(f_user); destination(d_user); }; -log { source(s_sys); filter(f_uucp); destination(d_uucp); }; - -log { source(s_sys); filter(p_debug); destination(d_debug); }; +# uncomment the line bellow if you want to send logs to syslog server +#log { source(s_sys); destination(d_loghost); }; +# log shorewall to separate log file by default +log { source(s_sys); filter(f_shorewall); destination(d_shorewall); 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); }; +log { source(s_sys); filter(f_ftp); destination(d_ftp); }; +log { source(s_sys); filter(f_kern); destination(d_kern); }; +log { source(s_sys); filter(f_lpr); destination(d_lpr); }; +log { source(s_sys); filter(f_mail); destination(d_mail); }; +log { source(s_sys); filter(f_news); filter(p_crit); destination(d_uucp); }; +log { source(s_sys); filter(f_news); filter(p_crit); destination(d_newscrit); }; +log { source(s_sys); filter(f_news); filter(p_err); destination(d_newserr); }; +log { source(s_sys); filter(f_news); filter(p_warn); destination(d_newsnotice); }; +log { source(s_sys); filter(f_news); filter(p_notice); destination(d_newsnotice); }; +log { source(s_sys); filter(f_news); filter(p_info); destination(d_newsnotice); }; +log { source(s_sys); filter(f_news); filter(p_debug); destination(d_newsnotice); }; +log { source(s_sys); filter(f_syslog); destination(d_syslog); }; +log { source(s_sys); filter(f_user); destination(d_user); }; +log { source(s_sys); filter(f_uucp); destination(d_uucp); }; +log { source(s_sys); filter(p_debug); destination(d_debug); }; log { source(s_sys); filter(f_daemon); filter(f_ppp); destination(d_ppp); }; log { source(s_sys); filter(f_local6); filter(f_freshclam); destination(d_freshclam); }; log { source(s_sys); filter(f_local0); filter(f_postgres); destination(d_postgres); }; - -log { source(s_sys); filter(p_emergency); destination(d_console); }; -#log { source(s_sys); destination(d_console_all); }; +log { source(s_sys); filter(p_emergency); destination(d_console); }; # This is a catchall statement, and should catch all messages which were not # accepted any of the previous statements. log { source(s_sys); destination(d_messages); flags(fallback); }; - -# Network syslogging -#log { source(s_sys); destination(d_loghost); }; diff --git a/syslog-ng.spec b/syslog-ng.spec index e70e816..0b832cc 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.16.1 -Release: 1 +Release: 2 License: GPL v2+ with OpenSSL exception Group: Daemons Source0: https://github.com/balabit/syslog-ng/archive/%{name}-%{version}.tar.gz @@ -560,7 +560,6 @@ exit 0 %{_datadir}/syslog-ng/include/scl/snmptrap %{_datadir}/syslog-ng/include/scl/solaris %{_datadir}/syslog-ng/include/scl/sudo -%{_datadir}/syslog-ng/include/scl/telegram %{_datadir}/syslog-ng/include/scl/windowseventlog %dir %{_datadir}/syslog-ng/include/scl/syslogconf %{_datadir}/syslog-ng/include/scl/syslogconf/README @@ -614,6 +613,7 @@ exit 0 %files module-http %defattr(644,root,root,755) %attr(755,root,root) %{moduledir}/libhttp.so +%{_datadir}/syslog-ng/include/scl/telegram %endif %if %{with json} -- 2.37.3