Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've built a bunch of munin plugins that monitor various back-end services. If the metrics dip below thresholds set in munin.conf, we're notified by email. However, if one of these services goes down completely, the plugin will fail and nobody gets notified!

I've followed the module-writing guide and added an exit code and message:

 sys.stderr.write('Error connecting to %s: %s\n' % (name, e))

But this only appears in the log. Nobody is watching the log.

Is there a way to make Munin alert on a complete plugin failure?

share|improve this question

migrated from Aug 23 '11 at 18:18

This question came from our site for computer enthusiasts and power users.

I've not looked into munin plugins, but I would think could you just wrap the code that fails in a try..except and return a value below the threshold (a specific value for meaning service offline, e.g., -1) in the exceptional case. – MonkeeSage Aug 23 '11 at 19:58
Heh, I thought of returning -1 as well. – a paid nerd Aug 23 '11 at 21:14

Are you open to alternatives? I believe that logcheck could solve your problem.

share|improve this answer
Or monit, sure, but I was hoping munin would do something smart. – a paid nerd Aug 23 '11 at 21:14

Your Answer


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.