monit-dev
[Top][All Lists]
Advanced

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

RE: configuration patch - final version


From: Christian Hopp
Subject: RE: configuration patch - final version
Date: Wed, 12 Feb 2003 10:04:52 +0100 (CET)

On Wed, 12 Feb 2003, Jan-Henrik Haukeland wrote:

>
> > Sounds good. The BER rules uses the same princip - it defines tag for
> > each data type + length + data part length. There's also support for
> > structures, etc. (primitive and constructed types, support for
> > user-defined data type classes),  is possible to validate the stored
> > data in the parser as well. Problem is, that it is little bit more
> > complicated.
>
> Yep, we therefore do this post-parse. That is; we let the parser parse the
> monitrc file and when the parse is finished we read the state file and update
> if necessary state values. (The only value we need to update is do_validate
> right?) So in p.y:parse() we simply add (the last lines before END_LOCK:
>
>
>   /* Creation of the global process list is synchronized  */
>   LOCK(Run.mutex)
>
>       initialize();
>       yyparse();
>       fclose(yyin);
>
>       /* If defined - add the last process to the process list */
>       if(current) {
>
>       createprocinfo();
>       addprocess(current);
>
>       }
>
>       /* Check the sanity of any dependency graph */
>       check_depend();
>
>      /* Check if a state file is present and that the timestamp is not to old
> */
>     if(has_statefile()) {
>
> load_and_replace_just_parsed_new_values_with_old_do_validate_values_from_state_
> file();
>     }
>
>   END_LOCK;

Just a paranoia question... what if the monitrc has changed more recent
then the state file?  Or... monit runs... you edit the monitrc (which is
not reloaded automatically)... monit writes state file... and monit
stop... and monit starts with state file and monitrc not fitting to
each other?


Christian

-- 
Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf.   fax: +49-5323-72-3197
                             pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/





reply via email to

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