Last active
February 28, 2017 08:00
-
-
Save darwin/eb1e2c66caed2fa64cefdc6f3a213414 to your computer and use it in GitHub Desktop.
Turris Omnia /etc/syslog-ng.conf => https://forum.turris.cz/t/is-it-safe-to-disable-watchdog-sh/1913
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/syslog-ng.conf b/syslog-ng.conf | |
| index 0836d72..b47f605 100644 | |
| --- a/syslog-ng.conf | |
| +++ b/syslog-ng.conf | |
| @@ -21,15 +21,35 @@ filter f_turris_iptables { | |
| not match(".*turris[^:]*: .*" value(MESSAGE)) or not level(debug); | |
| }; | |
| +filter f_not_cron { | |
| + not program(".*cron.*"); | |
| +}; | |
| + | |
| +filter f_cron { | |
| + program(".*cron.*"); | |
| +}; | |
| + | |
| destination messages { | |
| file("/var/log/messages" suppress(5) template("${ISODATE} ${PRIORITY} ${PROGRAM}[${PID}]: ${MSGONLY}\n") log_fifo_size(256)); | |
| }; | |
| +destination cron { | |
| + file("/var/log/cron" suppress(5) template("${ISODATE} ${PRIORITY} ${PROGRAM}[${PID}]: ${MSGONLY}\n") log_fifo_size(256)); | |
| +}; | |
| + | |
| log { | |
| source(src); | |
| source(kernel); | |
| filter(f_turris_iptables); | |
| + filter(f_not_cron); | |
| destination(messages); | |
| }; | |
| +log { | |
| + source(src); | |
| + source(kernel); | |
| + filter(f_cron); | |
| + destination(cron); | |
| +}; | |
| + | |
| include "/etc/syslog-ng.d/"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi and thanks for the idea. It would be good also add patch for /etc/logrotate to rotate /var/log/cron also.