Changing config files while nagios is running causes webinterface to mess up

Michael Huettig Michael.Huettig at Medien-Systempartner.de
Tue Jun 8 16:31:58 CEST 2004


Hi Raphael,
you are right:
The WEB-Interface gets confused, if you are changing your config, 'cause of 
the CGI's handnling and display nagios status, but nagios is running 
correctly, so it's on your hand to decide wether you have to restart nagios 
after any small changes or make some changes for a while and then restarting 
nagios, i've written some small scripts, which check nagios-config 
(
#!/bin/sh
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
)
and restart nagios
(
#!/bin/sh
PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:.
# Nagios-cfg checken und Nagios durchstarten
/usr/local/nagios/bin/check_nagioscfg >/dev/null
RETVAL=`echo $?`
#echo $RETVAL
if [ $RETVAL = 0 ]; then
        echo "[`date +%s`] RESTART_PROGRAM;`date +%s`" 
>/usr/local/nagios/var/rw/nagios.cmd
fi

Hope this helps ...

Regards

Michael
Am Dienstag, 8. Juni 2004 16:12 schrieb Raphael Mueller:
> Dear all,
>
> currently, I often change the configuration files of Nagios (Ver. 1.1)
> because we get a lot of new equipment these days.
> If I change the config files while Nagios is running, the Nagios web
> page starts to mess up, e.g. several devices disappear.
>
> My question: Am I doing something against the good practices if I edit
> the config files without stopping the Nagios service first?
>
> I don't understand too much about the architecture of Nagios, but
> according to chapter "Stopping And Restarting Nagios" of the online
> documentation
>     http://nagios.sourceforge.net/docs/1_0/stoprestart.html
> Nagios should only check the config files and (re)read them if I start,
> restart or reload the service.
> So, maybe, it's just the web interface which gets confused about my
> config changes?
>
> Of course, I could use a second set of config files to work on. Then, I
> would write a script which checks the copied set of config files, stops
> the service, copies them to the directory used by Nagios and start the
> service again....
>
> Maybe, I'm just thinking to far or there is a know workaround... any
> help is appreciated.
>
> Kind Regards,
> Raphael


**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
www.mimesweeper.com
**********************************************************************



-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org




More information about the Developers mailing list