The reason why this happens is because there's another instance of nagios
running.. Why? I don't know but I fixed that problema quite simple

I would like to share It with other that may have the same problem.

For some bizarre reason, a 90% nagios instance is runing in my server and
that one does not let the original do the monitoring.

I wrote a simple script that check for any nagios proc above 90% and kill
it... It may not be a solution, however my nagios it's being
Working fine since I did that.. ;)


#!/bin/sh
nagiospid=$(ps -aux | awk '{print($3 >= 90)?$2:"false"}' | grep -v "false")
if [ -z $nagiospid ] ; then
   echo "no nagios pid found"
else
   kill -9 $nagiospid
fi


#---------------------------------------------------------------------------
--------------------------------------------------------------------

Yes, that's the strange part it keep refreshing with the old pid

If the Nagios is "up" and you run:
[EMAIL PROTECTED] ~/config/objects]$ /usr/local/nagios/libexec/check_nagios -F
/usr/local/nagios/var/status.dat -e 1 -C '/usr/local/nagios/bin/nagios'
//result
NAGIOS OK: 1 process, status log updated 11 seconds ago

If the Nagios is "down" and you run:
[EMAIL PROTECTED] ~/config/objects]$ /usr/local/nagios/libexec/check_nagios -F
/usr/local/nagios/var/status.dat -e 1 -C '/usr/local/nagios/bin/nagios'
//result
NAGIOS CRITICAL: Cannot open status log for reading! 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, August 10, 2008 11:03 AM
To: nagios-users@lists.sourceforge.net
Subject: Nagios-users Digest, Vol 27, Issue 7

Send Nagios-users mailing list submissions to
        nagios-users@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/nagios-users
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Nagios-users digest..."



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users@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

Reply via email to