1

Apologies if this is the same question as How to suppress monit alert if restart successful?, but it appears like it might be different, so I'm asking again..

We want to have a monit alert check when an instance's uptime is 2 minutes. This is to alert us when an instance has rebooted. I got it working with this:

check program uptimecheck with path /root/uptime_check.sh if status != 0 then alert

..but the problem is it also alerts when the "check succeeded".. I only want the alert when it fails. How can I do this?

Thanks!

2
  • 1
    Are you certain that you need a check to see if a server is rebooting?
    – ewwhite
    Dec 16, 2014 at 18:52
  • does sound like a bad check. You should be monitoring the service it provides. If at some point you cluster this service so a reboot does not equal an outage you'll get someone out of bed for nothing.
    – Sirex
    Dec 16, 2014 at 22:19

0

You must log in to answer this question.

Browse other questions tagged .