[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Service timeout action
From: |
Dmitry Zbarski |
Subject: |
Service timeout action |
Date: |
Wed, 27 Apr 2005 13:49:43 +0300 |
User-agent: |
Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) |
Hi.
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
IF NUMBER RESTART NUMBER CYCLE(S) THEN exec /your/script
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.
- Service timeout action,
Dmitry Zbarski <=