nagios bailing out log messages - cause now known

Brian Loe knobdy at gmail.com
Wed Jan 31 16:37:07 CET 2007


I'm running "nagios_spawn.sh" from crontab every 5 minutes. This
script, provided by - I believe - someone on this list (thank you)
uses the check_nagios command to verify that nagios is running. For
some reason, it appears as though every other time this script is ran
(every ten minutes) it fails and tries to spawn a new Nagios process
which fails and gives me the "Lockfile /blah is help by PID blah.
Bailing out..." messages.

So I guess the question now is, why would this check fail every ten minutes?

The script:
#!/bin/bash
plugindir="/usr/local/nagios/libexec"
cmdstart="/etc/init.d/nagios start"
#Check nagios with check_nagios plugin
$plugindir/check_nagios -e 5 -F /usr/local/nagios/var/nagios.log -C
/usr/local/nagios/bin/nagios

if [ "${?}" != 0 ] ; then
  echo "CRITICAL:Nagios not found running..."
$cmdstart
 else
echo "OK:Nagios runnning..."
fi
exit

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list