patch: safe reload

Matthew Kent mkent at magoazul.com
Fri Dec 3 00:57:55 CET 2004


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/




More information about the Developers mailing list