monit-general
[Top][All Lists]
Advanced

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

EXEC does not work properly when using CYCLES


From: Andreas Oesterer
Subject: EXEC does not work properly when using CYCLES
Date: Wed, 28 Sep 2005 14:23:31 -0700

I recently go the monit-4.6-beta1 and a cycle specific bug fix that updated event.c and util.c
 
Everything works as expected when using ALERT, however EXEC causes the scripts to be executed too often.
 
 
My setup:
--------------
set daemon  30
 
check host monit_test with address 192.168.0.3
    if failed port 8081 protocol http and request "/index.jsp" with timeout 5 seconds for 3 times within 3 cycles then EXEC "/root/monit_test/suspend"
    else if passed for 3 cycles then EXEC "/root/monit_test/resume"
 
Test execution
---------------------
1) Begin where the service is running
2) Stopped service at 14:09:31
3) Restarted service at 14:14:54
 
 
My test output:
----------------------
Wed Sep 28 14:09:52 PDT 2005 Resuming  *
Wed Sep 28 14:10:22 PDT 2005 Resuming  *
Wed Sep 28 14:10:52 PDT 2005 Suspeding    -> "failed" Email is sent
Wed Sep 28 14:11:22 PDT 2005 Suspeding *
Wed Sep 28 14:11:52 PDT 2005 Suspeding *
Wed Sep 28 14:12:22 PDT 2005 Suspeding *
Wed Sep 28 14:12:52 PDT 2005 Suspeding *
Wed Sep 28 14:13:22 PDT 2005 Suspeding *
Wed Sep 28 14:13:52 PDT 2005 Suspeding *
Wed Sep 28 14:14:22 PDT 2005 Suspeding *
Wed Sep 28 14:14:57 PDT 2005 Suspeding *
Wed Sep 28 14:15:27 PDT 2005 Suspeding * 
Wed Sep 28 14:15:57 PDT 2005 Resuming  -> "passed" Email is sent

I marked the log entries where the script should not have been called with a "*". While it starts to detect that the service is down, it executes the resume script and as long as the service is down it calls the suspend script at every cycle. There is no issue when the service is up at every cycle.
 
 
Essentualy if the EXEC code would be called when it sends the emai, then everything would work fine.
 
 
 
Thanks, Andreas

reply via email to

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