monit-dev
[Top][All Lists]
Advanced

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

Re: plans


From: Martin Pala
Subject: Re: plans
Date: Tue, 24 Jun 2003 14:53:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030618 Debian/1.3.1-3

Christian Hopp wrote:

On Tue, 24 Jun 2003, Martin Pala wrote:

Christian Hopp wrote:

We could also make global methods.

This could be probably usefull. We have similar problem with alert
statements (global alert statement could save lot of space).

That might be the only difficult implementation part.  Shall we copy
all global method into each service... or do we copy it in case of
reference.  What about global<->local name clashes?  Do we overwrite
or is it a collision?

I think about following behaviour for global lists according to above discussion:

Let all types of services (process, file, directory and device) inherite global list of exec/methods and alerts. In the case that exec/method or alert entry has the same name localy, it is overriden by local statement (it has higher priority).

Two ways for this conflict solution:

1.) Monit will build lists staticaly during configuration parsing. Each list service's alert (and) exec list is initialized first by global list values and then local values are added. In the case that the name already exists (global value) it is replaced (by local value). ADVANTAGE: simplifies configuration + "simple" implementation (just through parser/p.y modification) (maybe pseudo advantage) DISADVANTAGE: waste of memory by holding multiple instances of the same value - it is internally equivalent to present Monit version

2.) Monit will build lists dynamicaly each time it needs to use the list - there is only one (global) instance of global exec/methods list and one instance of alert list (to save memory) + each service has its local lists - Monit will make intersection similar to point 1.) and create list to use in following action in the buffer.
ADVANTAGE: simplifies configuration
DISADVANTAGE: waste of CPU time by building the list each time it is needed


Conclusion:
Solutions 1.) and 2.) are approximatelly equal. Overhead to CPU or memory usage isn't critical in both solutions. Solution 2.) looks more sophisticated to me, but maybe 1.) could be better because of possible simplicity.


Martin

P.S We can maybe schedule global alert + global exec statements for monit post 4.0 (4.1 or 5.0?) to allow release 4.0 soon (there is enough changes in present CVS i think to release new version and batlle proof it :)







reply via email to

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