Very nice work Martin! I'll check it out later in detail, but just
want to add that this new function render the old timeout statement
redundant and I vote for making timeout depreciated with a warning
in the parser when used. Many are using it, so we can probably not
remove it before a 5.x release if we should be nice about it, which
we should.
On 28. aug. 2005, at 23.18, Martin Pala wrote:
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
<event_ratio.patch>
_______________________________________________
monit-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monit-dev
--
Jan-Henrik Haukeland
Mobil +47 97141255
_______________________________________________
monit-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monit-dev