monit-general
[Top][All Lists]
Advanced

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

Re: alerting and "for XY cycles"


From: Martin Pala
Subject: Re: alerting and "for XY cycles"
Date: Thu, 23 Sep 2010 14:07:00 +0200

Hi,

monit internally keeps state for every cycle, but as you noted if "XY cycles 
constraint is used, it doesn't display error until that "XY cycles" condition 
match.

In order to see whether the service failed in every cycle + alert after XY 
cycles, you can set it like this:

check host ...
   if failed port 80 then exec "/bin/true"     #note: this will cause error to 
display, the action is "do nothing"
   if failed port 80 3 times within 5 cycles then alert 


Regards,
Martin



On Sep 23, 2010, at 10:54 AM, Bernd Wurst wrote:

> Hi.
> 
> I use monit on an external host to monitor some core features of out servers 
> and give customers a notification when something fails.
> 
> I planned to get the following result:
> When a test fails, my status website shows a "warning" sign. When a test 
> fails 
> for multiple times (depending on service, e.g. 3 times) subsequently, I want 
> to get notified via email/sms and customers should see an "error" sign.
> 
> To achieve this, I wrote a simple web interface that parses the monit web 
> interface and shows status icons accordingly. But I did not get the info 
> "test 
> failed once" out of monit. When I configured Monit to alert after 3 cycles, 
> the status is still "up with all services" until all 3 cycles failed.
> I want to get an email/sms only when the service is down for a reasonable 
> time 
> but "up with all services" should only be displayed when the service is 
> really 
> up and working.
> 
> Is such a setup possible with monit? How should alerting be configured to 
> have 
> this work? Would be great if I could get around configuring everything twice.
> 
> cu, 
> Bernd
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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