[hobbit] custom client script and disable

Steve Steve.DiSorbo at yale.edu
Wed Nov 9 22:30:41 CET 2005


Henrik,

I knew I could count on you to help me see the light.  I hadn't even 
considered checking the status and acting on the result.

Just out of curiosity, Big Brother didn't act this too did it?

Henrik Stoerner wrote:

>On Wed, Nov 09, 2005 at 12:49:57PM -0500, Steve wrote:
>  
>
>>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.
>>    
>>
>
>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.
>
>  
>
>>So now the 64K question ... what can I change so the test does not run 
>>when disabled or ... where did I error?
>>    
>>
>
>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
>hobbit-unsubscribe at hswn.dk
>
>
>  
>

-- 
Steve DiSorbo
System Programmer
Yale University ITS, AM&T Library Systems
Voice (203) 432-6694
Fax   (203) 436-4067
steve.disorbo at yale.edu
http://www.library.yale.edu/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20051109/0e71ce73/attachment.html>


More information about the Xymon mailing list