patch: safe reload

Ethan Galstad nagios at nagios.org
Tue Dec 14 07:27:11 CET 2004


It looks like this patch might be useful to some, but I'll have to 
think about whether or not I'll incorporate it into the main code.  
I've always felt that an app should die if its HUP'ed with a bad 
configuration, rather than keep on chugging.  At any rate, this won't 
make it into 2.0, but I will consider it for the 3.x code.


On 2 Dec 2004 at 18:57, Matthew Kent wrote:

> Hi Ethan, any thoughts as to the usefulness of this patch?
> 
> On Wed, 2004-11-10 at 23:41, Matthew Kent wrote:
> > Followup patch from the discussion a week ago about having nagios
> > not die on HUP when the configs contain errors.
> > 
> > This patch does a few things, but mainly adds a function similar to
> > xodtemplate_cache_objects which stores the running config in it's
> > own 'running_config.cache' file. This requires reading a few more
> > config options from nagios.cfg into memory first, but has the
> > benefit of adding some sanity checking to them which didn't exist in
> > the xdata/ functions which reference them. It should also keep an
> > invalid 'objects.cache' from being written which the cgis could try
> > to read and error out.
> > 
> > So on a HUP from the web interface or command line, if a config
> > error is encountered in the main nagios.cfg, it will print the
> > problems and an error about not being able to load the new config to
> > the log and console, then read 'running_config.cache' and
> > 'objects.cache' back into memory and keep going. If the error is
> > just in the object definitions, the new config will be read in and
> > used, while the objects will come from the cache.  
> > 
> > The more I think about it, the more I believe this is a good
> > feature/behaviour, if there's anything as an admin you don't want
> > stopped it's probably your monitoring.
> > 
> > Patch is against latest cvs. 2nd patch for documentation included as
> > well.
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real
> users. Discover which products truly live up to the hype. Start
> reading now. http://productguide.itmanagersjournal.com/
> _______________________________________________ Nagios-devel mailing
> list Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/




More information about the Developers mailing list