I think I figured out a way to make this happen.<div><br></div><div>The command I need to run won't even return data on a machine that is not the primary server.  So I will do two things.  IF the server is not primary AND the command doesn't run, send a "clear" status back to the server.  IF they do work, go to the main test routine and send whatever color reflects the status.</div>
<div><br></div><div>Running this on both hosts will keep things from going purple, and will get me the stats I need.</div><div><br></div><div>Once I get it functional, I may need to chat with you guys regarding setting up an NCV.  I have tried the examples several times with no joy.  But, enough of that for now.  I have a new-year's celebration to get ready for.</div>
<div><br></div><div>Happy New Years, Hobbits!</div><div><br></div><div><br clear="all">---<br>Jerald M. Sheets jr.<br>
<br><br><div class="gmail_quote">On Wed, Dec 30, 2009 at 11:56 AM, Patrick Nixon <span dir="ltr"><<a href="mailto:pnixon@gmail.com">pnixon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I did something recently that checks the status of the conn column for<br>
a host before running a custom script.<br>
<br>
I accomplished it using hobbitdboard<br>
<br>
  BBJUNK=`bb localhost "hobbitdboard host=${BBHOST} test=ssh fields=color"`<br>
  if [[ "$BBJUNK" =~ "green" ]]; then<br>
    debugmsg Launching - $BBIP $BBHOST $SSHPRIV $BBJUNK;<br>
    nohup /usr/lib/hobbit/server/ext/pd2a.sh $BBIP $BBHOST $SSHPRIV &<br>
  elif [[ "$BBJUNK" == "" ]]; then<br>
    debugmsg Launching - $BBIP $BBHOST $SSHPRIV $BBJUNK;<br>
    nohup /usr/lib/hobbit/server/ext/pd2a.sh $BBIP $BBHOST $SSHPRIV &<br>
  else<br>
    outputmsg ssh down - $BBJUNK<br>
  fi<br>
<br>
<br>
Maybe that's something you can adapt for your test?<br>
<div><div></div><div class="h5"><br>
On Wed, Dec 30, 2009 at 11:34 AM, Jerald Sheets <<a href="mailto:questy@gmail.com">questy@gmail.com</a>> wrote:<br>
> I'm about to undertake writing a series of monitors for a custom app we have<br>
> here in-house.<br>
><br>
> This app lives over a networked filesystem (think cvfs or gpfs) that is<br>
> managed by two master nodes, a master and a failover.  As a result, only one<br>
> node at a time can answer the query I want to give it.<br>
><br>
> My conundrum:<br>
><br>
> If I make the query form my Xymon server on node1 and it fails over to<br>
> node2, node1 becomes completely unable to answer the question, and that<br>
> check would go "red".  Same for node2 back to node1.<br>
><br>
> If I run the check locally on each system, while one is working, the other<br>
> will go "blue".<br>
><br>
> Have any of you ever written monitors for servers that carry a service in an<br>
> active/passive configuration, and been able to keep the individual servers<br>
> from going into some strange state as a result of failovers and such?<br>
><br>
> How did you handle it?<br>
><br>
><br>
><br>
> ---<br>
> Jerald M. Sheets jr.<br>
><br>
<br>
</div></div><div><div></div><div class="h5">To unsubscribe from the hobbit list, send an e-mail to<br>
<a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>