monit-dev
[Top][All Lists]
Advanced

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

event ratio dependant actions implementation


From: Martin Pala
Subject: event ratio dependant actions implementation
Date: Sun, 28 Aug 2005 23:18:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050802 Debian/1.7.10-1

Hi,

here is the implementation of the event ratio dependant actions.

It is now possible to specify how many events during how many cycles are needed to trigger the action. Both failed and passed actions may be restricted this way.

Example syntax:

 if failed ... [[X] [times] [within] Y cycles] then <action>
 else if passed [[for] Z cycles] then <action>


The part 'X times within Y cycles' is optional - when not used, monit will act on first event (equals to '1 times within 1 cycle'). It is also possible to specify just consecutive cycles count.

This behavior is generic and extends all testing rules. Backward compatibility is fully retained.

Example:
 check host foo.bar with address 192.168.1.1
   if failed port 80 for 5 times within 8 cycles then exec '/my/script'
   else if passed for 10 cycles then alert


If you agree, i will send it to cvs.

TODO: documentation


Martin

Attachment: event_ratio.patch
Description: application/unknown


reply via email to

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