Problem with init script "nagios reload"
Daniel Geske
daniel.geske at yoc.de
Mon Oct 28 15:20:59 CET 2002
oh, this little underscore in status_nagios!!!
I'll try with that.
Thanks!
Daniel
-----Original Message-----
From: Nikolai Bamburov [mailto:niko at de.clara.net]
Sent: Monday, October 28, 2002 3:00 PM
To: Daniel Geske; nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Problem with init script "nagios reload"
In init script:
reload|force-reload)
printf "Running configuration check..."
$NagiosBin -v $NagiosCfg > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "done"
if test ! -f $NagiosRun; then
$0 start
else
NagiosPID=`head -n 1 $NagiosRun`
if status nagios > /dev/null; then
printf "Reloading nagios
configuration..."
killproc_nagios nagios -HUP
echo "done"
else
$0 stop
$0 start
fi
fi
else
$NagiosBin -v $NagiosCfg
echo "failed - aborting reload."
exit 1
fi
;;
must be:
reload|force-reload)
printf "Running configuration check..."
$NagiosBin -v $NagiosCfg > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "done"
if test ! -f $NagiosRun; then
$0 start
else
NagiosPID=`head -n 1 $NagiosRun`
if status_nagios nagios > /dev/null; then
printf "Reloading nagios
configuration..."
killproc_nagios nagios -HUP
echo "done"
else
$0 stop
$0 start
fi
fi
else
$NagiosBin -v $NagiosCfg
echo "failed - aborting reload."
exit 1
fi
;;
Regards,
Niko
----- Original Message -----
From: "Daniel Geske" <daniel.geske at yoc.de>
To: <nagios-users at lists.sourceforge.net>
Sent: Monday, October 28, 2002 2:00 PM
Subject: [Nagios-users] Problem with init script "nagios reload"
> Hi all,
>
> I have a problem with the start script that came with nagios.
> When nagios does not run I can start it with this command:
>
> /etc/init.d/nagios reload
> Running configuration check...done
> Starting network monitor: nagios
> PID TTY TIME CMD
> 27451 ? 00:00:00 nagios
> -- no problem.
>
> But when it does run already and I use the same command /etc/init.d/nagios
> reload I get this:
>
> Running configuration check...done
> /etc/init.d/nagios: status: command not found
> Stopping network monitor: nagios
> Starting network monitor: nagios
> No lock file found in /usr/local/nagios/var/nagios.lock
>
> Sometimes the above message does not appear. Instead, it seems to stop,
then
> start nagios just fine. BUT then I suddenly get many many critical
> notifications for all the passive checks nagios runs. I suppose nagios
does
> not shut itself down then. Instead, it just starts another instance. Then
> process ONE picks up the passive check result, and process TWO notifies,
> because it did not get any passive check results. So staff keeps on
getting
> OK, CRITICAL, OK, CRIT...etc.
>
> How can I make 100% sure nagios completely shuts itself down before it
> restarts?
> Is there an alternative startup script I can use?
> Has anybody else experienced similar problems?
>
> I'd be happy to hear from you as soon as possible.
> Sincerely
>
> Daniel
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
More information about the Users
mailing list