Survey of Nagios.

Marc Powell mpowell at ena.com
Sat Nov 16 16:48:16 CET 2002


Is it me or is using nagios to monitor itself a waste of effort. Consider this basic scenario:

Nagios crashes.
   Nagios is therefore not running.
   Nagios is not executing -any- service checks.
   Nagios can not execute the check_nagios plugin.
   No one gets notified.



--
Marc

Sent from a very tiny wireless device with a very tiny unlit keyboard.


-----Original Message-----
From: Pascal Miquet <p.miquet at hafiba.fr>
To: Scott <lists.scott at themagicbox.net>
CC: Nagios users <nagios-users at lists.sourceforge.net>
Sent: Sat Nov 16 08:48:01 2002
Subject: Re: [Nagios-users] Survey of Nagios.

This is OK I presume, 

But how should I take care of nagios notification, if I set  a service into nagios, and like to notify persons in charge of this service ? 
Into the script we just checks the nagios running state. 
Any idea ? 

Le sam 16/11/2002 à 10:30, Scott a écrit : 

Just to make an appendment to this, I noticed I had it in a test state

while writing it... here is the actual working copy.. sorry about that

folks.. enjoy



#!/usr/bin/perl



open PIDFILE, ("/path/to/nagios/var/nagios.lock");

$pid = <PIDFILE>;

close PIDFILE;

@nag_stat = `ps -ax |grep -e $pid`;



if (@nag_stat[0]) {

        print "nagios running\n";

} else {

        system('printf "Nagios not running: replace this with external

command\n"');

}



Scott said:

> I think you could just check the pid file for a number and run it

> against a ps -ax greping the pid, then notify if it doesnt exist..

> sounds fairly simple and probably a good idea too... Nothing worse then

> a network outage to find out that nagios isnt monitoring the network

> anyway...

>

> #!/usr/bin/perl

>

> open PIDFILE, ("/path/to/nagios/var/nagios.lock");

> $pid = <PIDFILE>;

> close PIDFILE;

>

> @nag_stat = `ps -ax |grep -e $pid`;

>

> if (!@nag_stat[0]) {

>         print "nagios running\n";

> } else {

>         system('printf "Nagios not running: replace this with external

> command\n

> "');

> }

>

> Somthing like this from cron would work nicely for that.. crude, yes,

> works, yes also.. somebody probably has better perl skills than myself

> that could ake this better but it would do what you are asking for

> though.

>

>

> Pascal Miquet said:

>> Is there some stuff to check that nagios is still alive, and may be

>> send an email.

>> Doing this is tricky with nagios, I know.

>> But I wonder, how admins could be informed that nagios is in a

>> blocking state or is not active.

>> Personaly, I think that a shell schedule by the anacron in an  hourly

>> mode shoud be a good way, and then send Email and sms.

>>

>> But the semantic question is how could we fetch the nagios settings to

>> issue notifications ?

>>

>> Any good idea, or link is welcome.

>> Pascal Miquet

>

>

>

>

>

> -------------------------------------------------------

> This sf.net email is sponsored by: To learn the basics of securing  your

> web site with SSL, click here to get a FREE TRIAL of a Thawte  Server

> Certificate: http://www.gothawte.com/rd524.html

> _______________________________________________

> 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: To learn the basics of securing 

your web site with SSL, click here to get a FREE TRIAL of a Thawte 

Server Certificate: http://www.gothawte.com/rd524.html

_______________________________________________

Nagios-users mailing list

Nagios-users at lists.sourceforge.net

 <https://lists.sourceforge.net/lists/listinfo/nagios-users> https://lists.sourceforge.net/lists/listinfo/nagios-users 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20021116/275b5003/attachment.html>


More information about the Users mailing list