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'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))
 sys.exit(2)

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 superuser.com Aug 23 '11 at 18:18

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

1  
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

1 Answer 1

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

 
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.