View previous topic :: View next topic |
Author |
Message |
kruel n00b
Joined: 08 Apr 2004 Posts: 52
|
Posted: Wed Apr 21, 2004 7:15 am Post subject: Removing CRON messages from syslog |
|
|
I use vixie-cron and syslog-ng. My syslog is getting filled with CRON messages every minute. Is there a way to set syslog-ng so that it ignores the CRON messages?
Thank you. |
|
Back to top |
|
|
thm Tux's lil' helper
Joined: 15 Dec 2003 Posts: 77 Location: Munich
|
Posted: Wed Apr 21, 2004 9:33 am Post subject: |
|
|
For some reason, the latest version installs an /etc/crontab containing the the following line:
Code: | * * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons |
As you can see, this gets called every minute and produces a log entry. But the script only checks whether there are hourly, dailty, etc. cron scripts.
IMHO it's enough to do that every hour. So replace the first asterisk by something like 1 or 5. be sure that it differs from correponding number of the lline removing the lastrun/cron.hourly flag.You can also suppress those log messages completely by redirecting the output of run-crons to /dev/null _________________ Thomas
Last edited by thm on Wed Apr 21, 2004 2:04 pm; edited 3 times in total |
|
Back to top |
|
|
30726 Veteran
Joined: 24 Sep 2003 Posts: 1501
|
Posted: Wed Apr 21, 2004 11:29 am Post subject: |
|
|
I put this in my syslog-ng.conf
Code: | # filter those damn cron lines
filter f_not_cron { not facility(cron); };
log { source(src); filter(f_not_cron); destination(messages); }; |
|
|
Back to top |
|
|
nevynxxx Veteran
Joined: 12 Nov 2003 Posts: 1123 Location: Manchester - UK
|
Posted: Mon Apr 26, 2004 3:22 pm Post subject: |
|
|
On a similar line, I want to remove the "i've just run..." messages but not any error messages from syslog, so the filter above wont work. Does anyone know where I can find the level's that cron logs on?
The man pages and website are useless for this. _________________ My Public Key
Wanted: Instructor in the art of Bowyery |
|
Back to top |
|
|
unstable_geek Tux's lil' helper
Joined: 01 Mar 2003 Posts: 102 Location: In my own happy place
|
Posted: Fri Jun 18, 2004 2:23 pm Post subject: |
|
|
Does this help? _________________ I hate my sig |
|
Back to top |
|
|
|