monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alerting when service is down and then up again?


From: Martin Pala
Subject: Re: alerting when service is down and then up again?
Date: Mon, 16 Aug 2010 13:53:02 +0200

The alert action is implicit - just add the alert statement ahead of check definition (global):

    set alert address@hidden

When the service will go down or up, you will receive alerts. There is no need to add explicit alert action to start program.

Regards,
Martin



On Aug 16, 2010, at 3:40 AM, Josh Sharpe wrote:

I set this monitor up:

check process order_approval with pidfile /rails/veloracing/current/tmp/pids/order_approval.pid
  start program = "start_order_approval"

I can't figure out how to alert when monit discovers that service is down and then alert me when the service is back up...

I guess I could alter this to be:

start program = "alert_that_service_is_down && start_order_approval && alert_that_service_is_up"

...but that's kinda hackey, and will send erroneous alerts if I trigger it through the webservice.

Basically, I need to trigger a script (not monit's 'alert' mechanism) when monit discovers the service is down, and a different script when monit recognizes that the service is running again.

Thanks!
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

[Prev in Thread] Current Thread [Next in Thread]