<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=678543710-06112007><FONT face=Arial size=2>Hi
all</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial size=2>On my nagios 1.4.1 I
am using script to schedule downtime like these:</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2>----------------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial size=2>HOST
Downtime</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2>#!/bin/sh</FONT></DIV>
<DIV><FONT face=Arial size=2><BR></FONT><FONT face=Arial
size=2>datetime=$(/usr/bin/perl -e 'print(time)')</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>hostname=$1<BR>start_time=$datetime<BR>duration=$2<BR>(( end_time =
$datetime + $duration
))<BR>fixed=1<BR>comment_author=nagios<BR>comment_data="Downtime di
Host"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>echocmd="/bin/echo"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>CommandFile="/usr/local/nagios2/var/rw/nagios.cmd"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR><FONT face=Arial
size=2># create the command line to add to the command
file<BR>cmdline="[$datetime]
SCHEDULE_HOST_DOWNTIME;$hostname;$start_time;$end_time;$fixed;$duration;$comment_auth<BR>or;$comment_data"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># append the command to the end of the command
file<BR>`$echocmd $cmdline >> $CommandFile`<BR>chown nagios:nagiocmd
$CommandFile</FONT></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2>--------------------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial size=2>SERVICE
Downtime</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2>#!/bin/sh</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2>datetime=$(/usr/bin/perl -e 'print(time)')</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2>hostname=$1<BR>service_des=$2<BR>start_time=$datetime<BR>duration=$3<BR>((
end_time = $datetime + $duration
))<BR>fixed=1<BR>comment_author=nagios<BR>comment_data="Downtime di
Servizio"</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2>echocmd="/bin/echo"</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2>CommandFile="/usr/local/nagios2/var/rw/nagios.cmd"</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial size=2></FONT><BR><FONT
face=Arial size=2># create the command line to add to the command
file<BR>cmdline="[$datetime]
SCHEDULE_SVC_DOWNTIME;$hostname;$service_des;$start_time;$end_time;$fixed;$duration;$<BR>comment_author;$comment_data"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># append the command to the end of the command
file<BR>`$echocmd $cmdline >> $CommandFile`<BR>chown nagios:nagiocmd
$CommandFile</FONT></DIV>
<DIV></SPAN><SPAN class=678543710-06112007><FONT face=Arial
size=2>-----------------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial size=2>These scripts do not
work on Nagios 2.10 ... have anyone something similar for Nagios 2.10
?</FONT></SPAN></DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=678543710-06112007><FONT face=Arial
size=2>Regards</FONT></SPAN></DIV>
<P align=left><FONT face=Arial color=#000080 size=2>Marco Borsani<BR>Technical
Operation<BR><BR>tel.: +390104310115<BR>e-fax:
+390683175950<BR><SPAN
style="FONT-SIZE: 7.5pt; COLOR: navy; FONT-FAMILY: Wingdings">*</SPAN>
<A href="mailto:m.borsani@it.net">m.borsani@it.net</A><BR><BR>ITnet
S.r.l.<BR><FONT color=#000000><FONT face=Tahoma><FONT color=#000080>Direzione e
Coordinamento di Weather Investments</FONT> </FONT></FONT>S.p.A.<BR>Via
Pacinotti, 39<BR>16151 - Genova<BR><BR><BR>In ottemperanza al D. lgs 196/03 in
materia di protezione dei dati personali, le informazioni contenute in questo
messaggio sono strettamente riservate e sono esclusivamente indirizzate al
destinatario indicato (oppure alla persona responsabile di rimetterlo al
destinatario). Qualsiasi uso, riproduzione o divulgazione di questo messaggio è
vietata. Nel caso in cui aveste ricevuto questa mail per errore, Vi invitiamo ad
avvertire il mittente al più presto a mezzo posta elettronica e distruggere il
messaggio erroneamente ricevuto.<BR><BR>According to Italy’s new data protection
code (Legislative Decree no. 196/2003) in force on January 1st 2004, Italian Law
196/03 concerning privacy, the information contained in this e-mail is
confidential and is intended for the addressee only. If you are not the correct
recipient, please note that any use, dissemination or copy of this
document/information is strictly prohibited.If you have received this message in
error, you should destroy it and please notify us immediately by
e-mail.</FONT></P>
<DIV> </DIV></BODY></HTML>