[Top][All Lists]

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

Re: Service timeout action

From: Jan-Henrik Haukeland
Subject: Re: Service timeout action
Date: Thu, 28 Apr 2005 00:27:49 +0200

Thanks for the patch, we have actually already got one similar to this and rejected it. If we should change the timeout statement, which we should, we will want to do it general. The planed function which will replace the timeout statement is mentioned here, AFAIK, no one is working on this function, so you are very welcome to try and extend your patch and give it a stab.

With this statement you could say, "if 3 restarts within 5 cycles then unmonitor" which is exactly what the timeout statement does, or you could execute an action.

On Apr 27, 2005, at 12:49, Dmitry Zbarski wrote:


I read through monit documentation and as I see I can't specify an action to be executed on timeout. (I mean IF NUMBER RESTART NUMBER CYCLE(S) THEN TIMEOUT). I studied sources of monit v4.5.1 and changed p.y file a little so now monit should
accept following syntax too
I am not sure if it works 100% correct, but I am testing this.
So what I want is review my patch and if you can include in the official CVS tree.
Here is the patch:

--- monit/p.y    2005-04-03 14:56:51.000000000 +0300
+++ monit-4.5.1/p.y    2005-04-26 14:54:35.568551145 +0300
@@ -930,6 +930,14 @@
           current->to_start= $2;
           current->to_cycle= $4;
+                | IF NUMBER RESTART NUMBER CYCLE THEN action1 {
+ seteventaction(&(current)->action_TIMEOUT, $<number>7,
+                     ACTION_IGNORE);
+                   check_timeout($2, $4);
+           current->def_timeout= TRUE;
+           current->to_start= $2;
+           current->to_cycle= $4;
+                 }
urloption       : /* EMPTY */

Dmitry Zbarski.

Jan-Henrik Haukeland
Mobil +47 97141255

reply via email to

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