On Tue, 12 Oct 2010, Jorge PaƱeda wrote:

I will like to take a look to the script. It sounds that would be helpful for the maintenance windows that we do to our servers been monitored by Nagios.

Could you provide me with the perl script?

sure, it's attached (i hope).  it's invoked as:

./generic-downtime.pl host service startmin endmin reason

where startmin and endmin are the minutes *from now* when scheduled downtime is to start and end. any field containing spaces should be double-quoted. here are some examples from my prod crontabs:

# no netbackup load alerts mon-thur nights or any weekend
0 15 * * 1,2,3,4  /usr/local/bin/generic-downtime.pl netbackup load 180 1020 "load 
unimportant outside core hours" >> /usr/local/nagios/var/rw/nagios.cmd
0 15 * * 5 /usr/local/bin/generic-downtime.pl netbackup load 180 4080 "load unimportant 
outside core hours" >> /usr/local/nagios/var/rw/nagios.cmd
# ccm backups only run tue-sat  mornings
50 23 * * 6 /usr/local/bin/generic-downtime.pl netbackup "CCM backups" 10 3250 "system 
backups only run tue-sat mornings" >> /usr/local/nagios/var/rw/nagios.cmd

hope this is of some use.



  Tom Yates
  Cambridge, UK.

Attachment: generic-downtime.pl
Description: Perl program

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Nagios-users mailing list
[email protected]
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