script to nofity admins of scheduled downtime

Ewan Leith ejl at man.fwltech.com
Thu Aug 28 19:07:37 CEST 2003


It's a good idea, but short of editting the nagios code to fire off an event
when it happens, the only way I can think of is to do some automated task
every 5 minutes or so and do a grep for DOWNTIME in
/usr/local/nagios/var/downtime.log - then you'd have the task of figuring
out if you'd already sent a notification about what's in there.

You could grep nagios.log instead for the start and stop messages, but since
it's pretty big I'd want to stay out of there.

The attached perl script is ugly and nasty and definitely buggy, but it does
work kinda. Run it every so often from a cronjob and it should work. maybe
:)

Ewan

> -----Original Message-----
> From: Jennifer Fountain [mailto:JFountain at rbinc.com]
> Sent: 28 August 2003 15:30
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] script to nofity admins of scheduled downtime
> 
> 
> has anyone written a script that emails admins or contacts,  if a
> contact or admin schedules downtime for a host or service?
> 
> 
> Cheers,
> Jenn
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: down.pl
Type: application/octet-stream
Size: 879 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030828/972e353a/attachment.obj>


More information about the Users mailing list