monit-dev
[Top][All Lists]
Advanced

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

Re: monit http thread responsiveness patch


From: Martin Pala
Subject: Re: monit http thread responsiveness patch
Date: Wed, 28 Jun 2006 00:24:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060620 Debian/1.7.13-0.2



Jan-Henrik Haukeland wrote:

On 27. jun. 2006, at 15.36, Martin Pala wrote:

Description of the patch:

When some action is requested via http, the http thread just sets the "doaction" task on the given service thread and wakes up the main thread. The main thread then performs normal testing cycle and when it founds the doaction flag on any service, it performs the requested action.


 From the patch

+++ validate.c    27 Jun 2006 11:38:58 -0000
+      if(s->doaction != ACTION_IGNORE) {
+        control_service(s->name, s->doaction);
+        s->doaction = ACTION_IGNORE;
+      } else if(s->monitor && !check_skip(s) && !check_timeout(s)) {

I think it may be better to run a new for-loop first and only check and act on the doaction flag or merge the if-else. In the code above, services with this flag set is excluded from the standard test (in the else part), which probably is not what we want.

Good topic :) I'll try to explain the cause - maybe i'm wrong:

It was based on the assumption, that when the action is scheduled by the http thread (such as stop/restart/start) it has higher precedence for particular service then the monitoring and it is not needed to check the service in the same cycle.

For example, when the service is to be restarted, it will be initializing after the restart and when we will try monitor it in the same cycle, it may not be fully initialized yet and monit can produce false alarms, thus i think it is better to perform the restart and postpone the monitoring on the next cycle.


Martin




reply via email to

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