<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
So ...<br>
<br>
I add the code you suggest, query bb for status and test for blue, but
it is never blue, even when disabled.  <br>
<br>
To be sure that my client script is not changing the status I put an
exit statement in the script so the code is not processed.  <br>
<br>
Maybe I need to find a better way to restart the application when it
fails, or get the vendor to address the problems with it.<br>
<br>
Here is what I see.<br>
<br>
<br>
<big><big><b>When the test is enabled the details screen is empty as it
should be no test or status is perfromed.<br>
<br>
# /usr/local/hobbit/server/bin/bb server "query server.application"<br>
green<br>
<br>
</b></big></big><br>
<br>
<table summary="Topline" width="100%">
  <tbody>
    <tr>
      <td height="16"><br>
      </td>
    </tr>
<!-- For the menu bar --><tr>
      <td align="left" valign="middle" width="30%"> <font
 color="silver" face="Arial, Helvetica" size="+1"><b>Hobbit</b></font> </td>
      <td align="center" valign="middle" width="40%">
      <center><font color="silver" face="Arial, Helvetica" size="+1"><b>server
- application</b></font></center>
      </td>
      <td align="right" valign="middle" width="30%"> <font
 color="silver" face="Arial, Helvetica" size="+1"><b>Thu Nov 10
10:35:27 2005</b></font> </td>
    </tr>
    <tr>
      <td colspan="3">
      <hr width="100%"> </td>
    </tr>
  </tbody>
</table>
<br>
<br>
<br>
<a name="begindata"> </a>
<br>
<br>
<center>
<form action="/hobbit-cgi/bb-hist.sh"> <input value="HISTORY"
 type="submit"> <input name="HISTFILE" value="epreservation.livelink"
 type="hidden"> <input name="ENTRIES" value="50" type="hidden"> <input
 name="IP" value="130.132.21.62" type="hidden"> <input
 name="DISPLAYNAME" value="epreservation" type="hidden"> </form>
</center>
<table summary="Detail Status" align="center" border="0">
  <tbody>
    <tr>
      <td>
      <br>
      </td>
    </tr>
  </tbody>
</table>
<br>
<br>
<font color="#87a9e5" size="-1">Status unchanged in 0 hours, 51 minutes<br>
Status message received from </font><br>
<br>
<br>
<br>
 <big><big><b>When I disable the test the detail screen show that the
status is green.<br>
<br>
# /usr/local/hobbit/server/bin/bb server "query server.application"<br>
green<br>
<br>
<br>
<br>
</b></big></big><br>
<table summary="Topline" width="100%">
  <tbody>
    <tr>
      <td align="left" valign="middle" width="30%"><font color="silver"
 face="Arial, Helvetica" size="+1"><b>Hobbit</b></font> </td>
      <td align="center" valign="middle" width="40%">
      <center><font color="silver" face="Arial, Helvetica" size="+1"><b>server
- application</b></font></center>
      </td>
      <td align="right" valign="middle" width="30%"> <font
 color="silver" face="Arial, Helvetica" size="+1"><b>Thu Nov 10
10:40:24 2005</b></font> </td>
    </tr>
    <tr>
      <td colspan="3">
      <hr width="100%"> </td>
    </tr>
  </tbody>
</table>
<br>
<br>
<br>
<a name="begindata"> </a>
<br>
<br>
<center>
<form action="/hobbit-cgi/bb-hist.sh"> <input value="HISTORY"
 type="submit"> <input name="HISTFILE" value="epreservation.livelink"
 type="hidden"> <input name="ENTRIES" value="50" type="hidden"> <input
 name="IP" value="130.132.21.62" type="hidden"> <input
 name="DISPLAYNAME" value="epreservation" type="hidden"> </form>
</center>
<table summary="Detail Status" align="center" border="0">
  <tbody>
    <tr>
      <td>
      <h3>Disabled until Thu Nov 10 14:40:24 2005
      </h3>
      </td>
    </tr>
    <tr>
      <td>
      <pre>Disabled by: admin @ xxx.xxx.xxx.xxx
Reason: test
      </pre>
      </td>
    </tr>
    <tr>
      <td><br>
      <hr>Current status message follows:
      <hr><br>
      </td>
    </tr>
    <tr>
      <td>
      <h3>green</h3>
      </td>
    </tr>
  </tbody>
</table>
<br>
<br>
<font color="#87a9e5" size="-1">Status unchanged in 0 hours, 52 minutes<br>
Status message received from </font><br>
<br>
<br>
<br>
<br>
Henrik Stoerner wrote:<br>
<blockquote cite="mid20051109203903.GA14694@hswn.dk" type="cite">
  <pre wrap="">On Wed, Nov 09, 2005 at 12:49:57PM -0500, Steve wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I wrote a client script to monitor an application, added to the 
clientlaunch.cfg file restarted hobbit, the monitor works well

Because the application I am monitoring is faulty I added to the client 
script a section of code to start up the application should it fail.  I 
shut down the application and Hobbit starts it up ... Cool.

To avoid having the application start up during the backup or 
maintenance window I disable the client script. 

I ran a test backup to be sure it worked, but it appears that Hobbit 
executes the client script even when the test is disabled, and the 
application goes from blue to red to green.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You're right that Hobbit runs the client script regardless of whether 
the status that the script reports is disabled or not. hobbitlaunch
which runs the script simply has no idea what status column(s) your 
script might report.

  </pre>
  <blockquote type="cite">
    <pre wrap="">So now the 64K question ... what can I change so the test does not run 
when disabled or ... where did I error?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Have your script check if the test is disabled, and abort if it is. 
Something like this:

    STATUS=`$BB $BBDISP "query $MACHINE.mytest" | awk '{print $1}'`
    if [ "$STATUS" = "blue" ]; then exit 0; fi

The bb(1) man-page has some more examples of how you can use the "query"
command.


Regards,
Henrik


To unsubscribe from the hobbit list, send an e-mail to
<a class="moz-txt-link-abbreviated" href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a>


  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Steve DiSorbo
System Programmer
Yale University ITS, AM&T Library Systems
Voice (203) 432-6694
Fax   (203) 436-4067
<a class="moz-txt-link-abbreviated" href="mailto:steve.disorbo@yale.edu">steve.disorbo@yale.edu</a>
<a class="moz-txt-link-freetext" href="http://www.library.yale.edu/">http://www.library.yale.edu/</a></pre>
</body>
</html>