diff --git a/syslog-ng-config/files/syslog-ng.conf b/syslog-ng-config/files/syslog-ng.conf index e40e6fd..c4e7e07 100644 --- a/syslog-ng-config/files/syslog-ng.conf +++ b/syslog-ng-config/files/syslog-ng.conf @@ -94,6 +94,7 @@ destination d_cron { file("/var/log/cron.log"); }; destination d_daemon { file("/var/log/daemon.log"); }; destination d_daemon_ocf { file("/var/log/daemon-ocf.log" template(t_ocf_log)); }; destination d_containerd { file("/var/log/containerd.log"); }; +destination d_collectd { file("/var/log/collectd.log"); }; destination d_kern { file("/var/log/kern.log"); }; destination d_lpr { file("/var/log/lpr.log"); }; destination d_mail { file("/var/log/mail.log"); }; @@ -212,9 +213,10 @@ filter f_messages { level(info,notice,warn) and filter f_auth { facility(auth, authpriv) and not program("audispd"); }; filter f_cron { facility(cron); }; -filter f_daemon { facility(daemon) and not program("containerd") and not program("^(OCF_).") and not match("snmp-auditor" value("MESSAGE")); }; +filter f_daemon { facility(daemon) and not program("containerd") and not program("collectd") and not program("^(OCF_).") and not match("snmp-auditor" value("MESSAGE")); }; filter f_daemon_ocf { facility(daemon) and program("^(OCF_)."); }; filter f_containerd { facility(daemon) and program("containerd"); }; +filter f_collectd { facility(daemon) and program("collectd"); }; filter f_kern { facility(kern); }; filter f_lpr { facility(lpr); }; filter f_local { facility(local0, local1, local3, local4, local5, @@ -293,6 +295,7 @@ log { source(s_src); filter(f_cron); destination(d_cron); }; log { source(s_src); filter(f_daemon); destination(d_daemon); }; log { source(s_src); filter(f_daemon_ocf); destination(d_daemon_ocf); }; log { source(s_src); filter(f_containerd); destination(d_containerd); }; +log { source(s_src); filter(f_collectd); destination(d_collectd); }; log { source(s_src); filter(f_kern); destination(d_kern); }; log { source(s_src); filter(f_lpr); destination(d_lpr); }; #log { source(s_src); filter(f_syslog3); destination(d_syslog); }; diff --git a/syslog-ng-config/files/syslog-ng.logrotate b/syslog-ng-config/files/syslog-ng.logrotate index 919184b..ab6bcf9 100644 --- a/syslog-ng-config/files/syslog-ng.logrotate +++ b/syslog-ng-config/files/syslog-ng.logrotate @@ -40,6 +40,22 @@ endscript } +/var/log/collectd.log +{ + nodateext + size 10M + start 1 + rotate 10 + missingok + notifempty + compress + sharedscripts + postrotate + systemctl reload syslog-ng > /dev/null 2>&1 || true + endscript +} + + /var/log/nfv-vim.log { nodateext