<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1126" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff size=2>Until 
2.0 is out, I had two suggestions that might help.  You may already be 
using one or both of them.</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff size=2>1) 
Make sure you are using service dependencies to the fullest extent 
possible.  This could limit the number of things that you have to place in 
maintenance.</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff size=2>This 
option has some significant limitations since the dependency graph isn't always 
a pretty tree.  In particular, any services where there are clusters 
or redundant servers make it hard to define meaningful 
dependencies.</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff size=2>2) Use 
shell/perl scripts to schedule the maintenance.</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff size=2>This 
option helps if the set of services is repeated more than once or if you can 
easily generate a list of them to program against.  Here is a simple 
example from a system still running NetSaint.  I'm not sure how much the 
external command interface has changed for Nagios, but the idea should be 
similar.  There was some discussion of using other programs to generate 
external commands recently.  You might try searching the 
archives.</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2>#!/bin/sh</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2>CMDFILE="/home/netsaint/var/rw/netsaint.cmd"</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2>start_time=`date -d "today 0200" +%s`<BR>end_time=`date -d "today 0530" 
+%s`</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2>svc_descr="Content-uncached"</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2>now=`date +%s`</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff size=2>echo 
"[$now] SCHEDULE_SVC_DOWNTIME;machine1;$svc_descr;$start_time;$end_time" 
>$CMDFILE<BR>echo "[$now] 
SCHEDULE_SVC_DOWNTIME;machine2;$svc_descr;$start_time;$end_time" 
>$CMDFILE<BR>echo "[$now] 
SCHEDULE_SVC_DOWNTIME;machine3;$svc_descr;$start_time;$end_time" 
>$CMDFILE<BR>echo "[$now] 
SCHEDULE_SVC_DOWNTIME;www2;$svc_descr;$start_time;$end_time" 
>$CMDFILE</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff size=2>In 
this case, the list of machines was static, so I just used cut/paste to build 
it.  You can always write a loop to crunch through a list.  Be sure to 
run the script as a user that has permission to write to the command 
socket.</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff size=2>In 
this case, we ended up making this work a regularly scheduled maintenance task, 
so we defined an appropriate timeperiod and told NetSaint not to complain about 
the affected services during the scheduled maintenance windows.  The script 
idea still applies if the work isn't performed on a fixed schedule 
though.</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2>-dpm</FONT></SPAN></DIV>
<DIV><SPAN class=107033022-21052003><SPAN lang=en-us><FONT face=Arial 
size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=107033022-21052003><SPAN lang=en-us><FONT face=Arial 
size=2>--</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Arial size=2>  
David P. Maynard<BR>  OutServ.net, Inc. -- Coordinated IT Operations 
Solutions</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Arial size=2>  
Email: dmaynard@outserv.net, Tel: +1 512 977 8918, Fax: +1 512 977 
0986</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Arial size=2>--</FONT></SPAN> 
</DIV></SPAN>
<DIV><SPAN class=107033022-21052003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Tahoma><FONT size=2><FONT face=Arial><FONT color=#0000ff><SPAN 
class=107033022-21052003></SPAN></FONT></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Tahoma><FONT size=2><FONT face=Arial><FONT color=#0000ff><SPAN 
class=107033022-21052003> </SPAN></FONT></FONT>-----Original 
Message-----<BR><B>From:</B> Hochberg, Keith [mailto:Keith.Hochberg@mtvi.com] 
<BR><B>Sent:</B> Wednesday, May 21, 2003 4:13 PM<BR><B>To:</B> 
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> [Nagios-users] service 
groups?<BR><BR></DIV></FONT></FONT>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px"><!-- Converted from text/rtf format -->
  <P><FONT face=Arial size=2>Hi All,</FONT> </P>
  <P><FONT face=Arial size=2>Whenever my company runs a maintenance we try to 
  identify all hosts and services which will be affected and put them into 
  maintenance mode.  I am finding that this would an easier process if 
  there were service groups defined in nagios.  Specifically on our web 
  servers (which have instances for over 25 different sites) we have to go in 
  and manually put each instance on each webserver (which are defined as 
  services) into maintenance mode.  Sometimes we have to put over 100 
  different services into maintenance mode if more than one site will be 
  affected during a maintenance.  It would be great if we could group all 
  services into a service group and put the whole group into maintenance 
  mode.  has anyone ran into a similar problem?  I have over 2,000 
  service checks defined in our nagios build and it is getting hard to manage 
  only using hostgroups.  </FONT></P>
  <P><FONT face=Arial size=2>Much thanks in advance,</FONT> </P>
  <P><FONT face=Arial size=2>Keith Hochberg</FONT> 
  </P>------------------------------------------------------- This SF.net email 
  is sponsored by: ObjectStore. If flattening out C++ or Java code to make your 
  application fit in a relational database is painful, don't do it! Check out 
  ObjectStore. Now part of Progress Software. 
  http://www.objectstore.net/sourceforge 
  _______________________________________________ Nagios-users mailing list 
  Nagios-users@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</BLOCKQUOTE></BODY></HTML>