Survey of Nagios.

Scott lists.scott at themagicbox.net
Sat Nov 16 16:47:03 CET 2002


Okay, I see where this is heading.. basically, as I think I was discussing
this with somebody else on this list, have a GSM modem attached to the
server directly. When nagios dies it sends a page to a designated
person(s).. This is not part of Nagios itelf for obvious reasons in that
it cant monitor if it is not alive to monitor...
The downfall of this is that the contacts have to be hard coded outside
nagios (unless somebody wants to write a parser for the contacts.cfg) but
this isnt really a problem unless you have a quick turnover of
staff/sysadmins. :)

Pascal Miquet said:
> 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
>
>





-------------------------------------------------------
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




More information about the Users mailing list