Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using munin on a system which is adding a log entry in syslog everytime the munin-node cron job executes. It is not an issue but it sometimes makes other errors spotting difficult. There are entries like

Feb 28 07:05:01 li235-57 CRON[2634]: (root) CMD (if [ -x /etc/munin/plugins/apt_all ]; then /etc/munin/plugins/apt_all update 7200 12 >/dev/null; elif [ -x /etc/munin/plugins/apt ]; then /etc/munin/plugins/apt update 7200 12 >/dev/null; fi)

every 5 minutes and I was wondering how can I stop the messages going into syslog. For munin specific errors I anyways have to keep an eye on /var/log/munin/*

Thanks Sparsh

share|improve this question

4 Answers 4

up vote 3 down vote accepted

Depends on syslog. If use rsyslog(Ubuntu/Debian), you can edit /etc/rsyslog.d/50-default.conf:

#
# First some standard log files.  Log by facility.
#
:msg,contains,"/etc/munin/plugins/apt_all update 7200" ~
auth,authpriv.*                 /var/log/auth.log

It's a cron syslog message(not Munin).

share|improve this answer
    
Hello, Thanks. I added this exactly into my rsyslog.d/50-defauly.conf file. I restarted cron but still see the logs from munin in syslog. Do I need to do something else as well. –  Sparsh Gupta Feb 28 '11 at 8:11
    
Yes. You need restart rsyslog: /etc/init.d/rsyslog restart –  ooshro Feb 28 '11 at 8:16

This isn't a munin message, it's a cron message. It's possible to stop all cron messages from going into /var/log/syslog, and/or to send them somewhere else, but that's all. Would you like to do that?

share|improve this answer

To add to the answer above (I cannot edit or comment): for newer Munin versions the information provided by syslog is different:

CRON[9413]: (root) CMD (if [ -x /etc/munin/plugins/apt_all ]; then munin-run apt_all update 7200 12 >/dev/null; elif [ -x /etc/munin/plugins/apt ]; then munin-run apt update 7200 12 >/dev/null; fi)
CRON[9414]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi)

In /etc/rsyslog.d/50-default.conf, underneath # First some standard log files. Log by facility., add following two lines:

:msg, contains, "then /usr/bin/munin-cron" ~
:msg, contains, "then munin-run apt_all update 7200 12" ~

Then restart the rsyslog process:

service rsyslog restart

Using Munin 2.0.17-2ubuntu1 on Ubuntu Saucy.

share|improve this answer

If you do not use apt_all munin plugin you can just comment out this cron job in

/etc/cron.d/munin-node
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.