anyone done this before?
Bob Eckhardt
beckhardt at infonow.com
Wed Jun 15 21:57:29 CEST 2005
Thx all for the replies. I used the info gathered from the link Marc
was so kind to post (http://www.nagios.org/faqs/viewfaq.php?faq_id=66)
and wrote this if anyone wants it....simple but effective
####################
#!/bin/csh
setenv WHATSOFF_SERVICE `cat /opt/nagios/var/status.log | grep SERVICE |
awk -F";" '{ if ($10 == 0) { printf("%s\t%s SERVICE check is turned
off\n\r", $2, $3)}}'`
setenv WHATSOFF_HOST `cat /opt/nagios/var/status.log | grep HOST | awk -F";"
'{ if ($14 == 0) { printf("%s HOST check is turned off\n\r", $2)}}'`
if ("$WHATSOFF_SERVICE" != "") then
echo "$WHATSOFF_SERVICE" | mail -s "service checks turned off on nagios"
towhomitmayconcern at mymailserver.com
endif
if ("$WHATSOFF_HOST" != "") then
echo "$WHATSOFF_HOST" | mail -s "host checks turned off on nagios"
towhomitmayconcern at mymailserver.com
endif
########################
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Lori Adams
Sent: Wednesday, June 15, 2005 12:04 PM
To: Bob Eckhardt; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] anyone done this before?
For notifications turned off. This is the URL:
http://your-nagios/cgi-bin/status.cgi?host=all&type=detail&serviceprops=
4096
As for a cron, I wrote a perl script that downloads that page using
HTTP::Request, and parses it.
Let me know if you're interested in more details.
-Lori
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Bob
Eckhardt
Sent: Wednesday, June 15, 2005 10:41 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] anyone done this before?
I want to write a script that runs in cron and checks
whatever file nagios looks at to know what boxes are put in passive
check
mode
or notifications turned off, and have it email me once a day.
We have this problem where things get turned off and not back on,
imagine
that.
With the email I can see what was left in the wrong check state and
re-enable it.
Is there a file I can parse, if so is there a specific thing/field I can
look at.
Make sense?
Bob
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick
_______________________________________________
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
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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