From 375a8e52dad76c4c432c1a4f95154b63b48569d3 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Tue, 30 Jun 2015 19:39:15 +0100 Subject: factory-default: Do not make app-admin/syslog-ng config version dependent --- .../syslog-ng-3.6.2/etc/syslog-ng/syslog-ng.conf | 102 --------------------- .../syslog-ng/etc/syslog-ng/syslog-ng.conf | 102 +++++++++++++++++++++ 2 files changed, 102 insertions(+), 102 deletions(-) delete mode 100644 factory-default/app-admin/syslog-ng-3.6.2/etc/syslog-ng/syslog-ng.conf create mode 100644 factory-default/app-admin/syslog-ng/etc/syslog-ng/syslog-ng.conf diff --git a/factory-default/app-admin/syslog-ng-3.6.2/etc/syslog-ng/syslog-ng.conf b/factory-default/app-admin/syslog-ng-3.6.2/etc/syslog-ng/syslog-ng.conf deleted file mode 100644 index df9d5d2f..00000000 --- a/factory-default/app-admin/syslog-ng-3.6.2/etc/syslog-ng/syslog-ng.conf +++ /dev/null @@ -1,102 +0,0 @@ -@version: 3.6 - -@module system-source - -options { - flush_lines (0); - time_reopen (10); - log_fifo_size (10000); - use_dns (no); - use_fqdn (no); - create_dirs (yes); - keep_hostname (no); - log_msg_size (2048); - chain_hostnames (no); - - # The default action of syslog-ng is to log a STATS line - # to the file every 10 minutes. That's pretty ugly after a while. - # Change it to every 1 hour so you get a nice daily update of - # how many messages syslog-ng missed (0). - stats_freq(3600); - - # The default action of syslog-ng is to log a MARK line - # to the file every 20 minutes. That's seems high for most - # people so turn it down to once an hour. Set it to zero - # if you don't want the functionality at all. - mark_freq(3600); -}; - -source s_local { - # To collect warnings, errors and notices from syslog-ng itself - internal(); - - # Automatically collect the system-specific log messages of the host - # on a number of platforms - # - # Linux: - # unix-dgram("/dev/log"); - # file("/proc/kmsg" program-override("kernel") flags(kernel)); - system(); - - # BSD syslog protocol - udp(ip(127.0.0.1)); -}; - -template t_logformat { template("${ISODATE} ${FACILITY}.${PRIORITY} ${HOST} ${MSGHDR}${MSGONLY}\n"); }; - -filter f_auth { facility(auth, authpriv); }; -filter f_cron { facility(cron); }; -filter f_daemon { facility(daemon); }; -filter f_kernel { facility(kern); }; -filter f_mail { facility(mail); }; -filter f_user { facility(user); }; -filter f_emerg { level(emerg); }; -filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); }; - -filter f_firewall { facility(kern) and match("IN=" value("MESSAGE")); }; -filter f_haproxy { program("haproxy"); }; -filter f_apache_access { program("httpd") and facility(local2); }; -filter f_apache_error { program("httpd") and facility(local3); }; -filter f_php_error { program("apache2") and facility(user); }; - -destination d_auth { file("/var/log/auth.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_cron { file("/var/log/cron.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_daemon { file("/var/log/daemon.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_kernel { file("/var/log/kern.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_mail { file("/var/log/mail.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_messages { file("/var/log/messages" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_user { file("/var/log/user.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_debug { file("/var/log/debug.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; - -destination d_firewall { file("/var/log/firewall.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_apache_access { file("/var/log/apache2/access.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_apache_error { file("/var/log/apache2/error.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; -destination d_haproxy { file("/var/log/haproxy.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; - -destination d_net { - syslog("log.as29.net" - transport(tls) - tls(ca_dir("/etc/ssl/certs") - peer_verify(required-trusted) - cipher-suite(aes-256-cbc) - ) - ); -}; - -log { source(s_local); destination(d_net); }; - -log { source(s_local); filter(f_firewall); destination(d_firewall); flags(final); }; -log { source(s_local); filter(f_haproxy); destination(d_haproxy); flags(final); }; -log { source(s_local); filter(f_apache_access); destination(d_apache_access); flags(final); }; -log { source(s_local); filter(f_apache_error); destination(d_apache_error); flags(final); }; -log { source(s_local); filter(f_php_error); destination(d_apache_error); flags(final); }; - -log { source(s_local); filter(f_auth); destination(d_auth); flags(final); }; -log { source(s_local); filter(f_cron); destination(d_cron); flags(final); }; -log { source(s_local); filter(f_daemon); destination(d_daemon); flags(final); }; -log { source(s_local); filter(f_kernel); destination(d_kernel); flags(final); }; -log { source(s_local); filter(f_mail); destination(d_mail); flags(final); }; -log { source(s_local); filter(f_user); destination(d_user); flags(final); }; -log { source(s_local); filter(f_debug); destination(d_debug); flags(final); }; - -log { source(s_local); destination(d_messages); }; diff --git a/factory-default/app-admin/syslog-ng/etc/syslog-ng/syslog-ng.conf b/factory-default/app-admin/syslog-ng/etc/syslog-ng/syslog-ng.conf new file mode 100644 index 00000000..df9d5d2f --- /dev/null +++ b/factory-default/app-admin/syslog-ng/etc/syslog-ng/syslog-ng.conf @@ -0,0 +1,102 @@ +@version: 3.6 + +@module system-source + +options { + flush_lines (0); + time_reopen (10); + log_fifo_size (10000); + use_dns (no); + use_fqdn (no); + create_dirs (yes); + keep_hostname (no); + log_msg_size (2048); + chain_hostnames (no); + + # The default action of syslog-ng is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 1 hour so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats_freq(3600); + + # The default action of syslog-ng is to log a MARK line + # to the file every 20 minutes. That's seems high for most + # people so turn it down to once an hour. Set it to zero + # if you don't want the functionality at all. + mark_freq(3600); +}; + +source s_local { + # To collect warnings, errors and notices from syslog-ng itself + internal(); + + # Automatically collect the system-specific log messages of the host + # on a number of platforms + # + # Linux: + # unix-dgram("/dev/log"); + # file("/proc/kmsg" program-override("kernel") flags(kernel)); + system(); + + # BSD syslog protocol + udp(ip(127.0.0.1)); +}; + +template t_logformat { template("${ISODATE} ${FACILITY}.${PRIORITY} ${HOST} ${MSGHDR}${MSGONLY}\n"); }; + +filter f_auth { facility(auth, authpriv); }; +filter f_cron { facility(cron); }; +filter f_daemon { facility(daemon); }; +filter f_kernel { facility(kern); }; +filter f_mail { facility(mail); }; +filter f_user { facility(user); }; +filter f_emerg { level(emerg); }; +filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); }; + +filter f_firewall { facility(kern) and match("IN=" value("MESSAGE")); }; +filter f_haproxy { program("haproxy"); }; +filter f_apache_access { program("httpd") and facility(local2); }; +filter f_apache_error { program("httpd") and facility(local3); }; +filter f_php_error { program("apache2") and facility(user); }; + +destination d_auth { file("/var/log/auth.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_cron { file("/var/log/cron.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_daemon { file("/var/log/daemon.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_kernel { file("/var/log/kern.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_mail { file("/var/log/mail.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_messages { file("/var/log/messages" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_user { file("/var/log/user.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_debug { file("/var/log/debug.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; + +destination d_firewall { file("/var/log/firewall.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_apache_access { file("/var/log/apache2/access.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_apache_error { file("/var/log/apache2/error.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_haproxy { file("/var/log/haproxy.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; + +destination d_net { + syslog("log.as29.net" + transport(tls) + tls(ca_dir("/etc/ssl/certs") + peer_verify(required-trusted) + cipher-suite(aes-256-cbc) + ) + ); +}; + +log { source(s_local); destination(d_net); }; + +log { source(s_local); filter(f_firewall); destination(d_firewall); flags(final); }; +log { source(s_local); filter(f_haproxy); destination(d_haproxy); flags(final); }; +log { source(s_local); filter(f_apache_access); destination(d_apache_access); flags(final); }; +log { source(s_local); filter(f_apache_error); destination(d_apache_error); flags(final); }; +log { source(s_local); filter(f_php_error); destination(d_apache_error); flags(final); }; + +log { source(s_local); filter(f_auth); destination(d_auth); flags(final); }; +log { source(s_local); filter(f_cron); destination(d_cron); flags(final); }; +log { source(s_local); filter(f_daemon); destination(d_daemon); flags(final); }; +log { source(s_local); filter(f_kernel); destination(d_kernel); flags(final); }; +log { source(s_local); filter(f_mail); destination(d_mail); flags(final); }; +log { source(s_local); filter(f_user); destination(d_user); flags(final); }; +log { source(s_local); filter(f_debug); destination(d_debug); flags(final); }; + +log { source(s_local); destination(d_messages); }; -- cgit v1.2.3