monit-general
[Top][All Lists]
Advanced

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

Re: Feature request: /etc/monit.d config directory and include support


From: Mark Ferlatte
Subject: Re: Feature request: /etc/monit.d config directory and include support
Date: Fri, 12 Dec 2003 11:28:54 -0800
User-agent: Mutt/1.4.1i

Jan-Henrik Haukeland said on Fri, Dec 12, 2003 at 04:50:17AM +0100:
> Mark Ferlatte <address@hidden> writes:
> > A very naive implementation could be as simple as having monit read
> > the config into memory only looking for include statements; when it
> > finds one, replace the line with the contents of the included file,
> > else for each file in included dir, add them in lexigraphic order.
> >
> > Then use the existing parser on the string in memory.  :)
> 
> This is certainly an alternative way to handle 'include' parsing.
   
Sigh.  I need to be more explicit about humor; I have odd ideas about what's
funny sometimes.

No more un-funny jokes about parsers.

> That may be difficult, because if we switch to using a XML DOM parser
> the internal data-structure representing the control file should
> change to the DOM tree data structure. Making the code operate on two
> alternative data structures will be difficult. Of course we could
> parse today's controlfile syntax into a DOM tree structure but that is
> much work for something that will be short lived. 

If it's very difficult, then it's probably not worth doing.  I didn't realize
that you intended to use DOM as your internal configuration data structure: I
thought you were going to parse the XML into the existing configuration data
structures, in which case supporting both syntaxes would be much easier, I
think.

M

Attachment: pgpQxXkX7fbND.pgp
Description: PGP signature


reply via email to

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