<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><head><META content="text/html; charset=utf-8" http-equiv="Content-Type">

<STYLE><!--         /* Style Definitions */         p.4797cdf4-190c-45e8-94be-fefb3206a149, li.4797cdf4-190c-45e8-94be-fefb3206a149, div.4797cdf4-190c-45e8-94be-fefb3206a149, table.4797cdf4-190c-45e8-94be-fefb3206a149Table         {margin:0cm;    margin-bottom:.0001pt;}        div.Section1        {page:Section1;}        --> <!--          #4797cdf4-190c-45e8-94be-fefb3206a149excontact a{color:white;text-decoration:none;}          #4797cdf4-190c-45e8-94be-fefb3206a149excontact a:hover{text-decoration:underline;}          --></STYLE>

<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content="MSHTML 6.00.3790.4357" name=GENERATOR></head><BODY>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2>There is a nice write-up about incorporating custom scripts 
into hobbit (xymon) on the help menu @ help->.Tips and 
Tricks.</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2></FONT></SPAN> </DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2>The status "dot" will appear by whatever you tell hobbit to 
place it at in your "bb" status message.   So the command that Josh 
put in point #2:</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2></FONT></SPAN> </DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009>$BB $BBDISP "status 
$MACHINE.$COLUMN $COLOR `date`<BR></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2>Actually expands to something like:</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2></FONT></SPAN> </DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2>/hobbit/client/bin/bb 10.1.1.25 
 "status myserver.dns.domain Custom_Test green </FONT></SPAN><SPAN class=705561214-04112009> <FONT color=#0000ff face=Arial size=2>Wed 
Nov  4 08:19:23 CST 2009"</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2></FONT></SPAN> </DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2>So on your web page a server named myserver.dns.domain with 
a test column of Custom_Test with a green status.</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2></FONT></SPAN> </DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009><FONT color=#0000ff face=Arial size=2>        
........Bruce</FONT></SPAN></DIV>
<DIV align=left dir=ltr><SPAN class=705561214-04112009></SPAN> </DIV><BR>
<DIV align=left class=OutlookMessageHeader dir=ltr lang=en-us>
</DIV> 
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"> <FONT SIZE="+0"></FONT></P>
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"> <FONT FACE="Arial"><FONT SIZE="2"><FONT COLOR="#999999"><FONT COLOR="#000000"><STRONG>Bruce<FONT COLOR="#808080"><FONT COLOR="#000000"> White</FONT></FONT></STRONG></FONT></FONT></FONT></FONT></P>
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"><FONT FACE="Arial"><FONT SIZE="2"><FONT COLOR="#808080"> Senior Enterprise Systems Engineer | Phone: 630-671-5169 | Fax: 630-893-1648 | bewhite@fellowes.com | <A HREF="http://www.fellowes.com/">www.fellowes.com</A></FONT></FONT></FONT></P>
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"><FONT FACE="Arial" SIZE="2"></FONT> </P>
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"><IMG ALIGN="baseline" ALT BORDER="0" HSPACE="0" SRC="cid:imagea98af3.jpg@30ea486b.b3a4416d"> </P>
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"><FONT FACE="Arial" SIZE="2"></FONT> </P>
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"><FONT SIZE="+0"></FONT><STRONG></STRONG><FONT SIZE="+0"></FONT><FONT SIZE="+0"></FONT><FONT SIZE="+0"></FONT><FONT COLOR="#808080" FACE="Arial" SIZE="1">Disclaimer: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Fellowes, Inc.</FONT></P>
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"><FONT FACE="Arial" SIZE="2"></FONT> </P>
<P CLASS="4797cdf4-190c-45e8-94be-fefb3206a149"><FONT FACE="Arial" SIZE="2"><DIV align=left class=OutlookMessageHeader dir=ltr lang=en-us><HR tabIndex=-1></DIV><DIV align=left class=OutlookMessageHeader dir=ltr lang=en-us>
<FONT face=Tahoma size=2><B>From:</B> Josh Luthman 
[mailto:josh@imaginenetworksllc.com] <BR><B>Sent:</B> Monday, November 02, 2009 
5:54 PM<BR><B>To:</B> hobbit@hswn.dk<BR><B>Subject:</B> Re: [hobbit] custom 
scripts<BR></FONT><BR></DIV>
<DIV></DIV>1.<BR>Look at <A href="http://xymon.com/hobbit-cgi/viewconf.sh">http://xymon.com/hobbit-cgi/viewconf.sh</A><BR>172.16.10.5 
<A href="http://miro.hswn.dk">miro.hswn.dk</A> # ssh <A href="http://miro.hswn.dk/">http://miro.hswn.dk/</A><BR><BR>Then look at the <A href="http://miro.hswn.dk">miro.hswn.dk</A> server under the http column 
here:<BR><A href="http://xymon.com/hobbit/servers/servers.html">http://xymon.com/hobbit/servers/servers.html</A><BR><BR>Just 
put your information in.  No custom script needed.<BR><BR>2.<BR>I can't 
help with custom scripts but the document expressed you need to...<BR><BR># Tell 
Hobbit about it<BR>$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`<BR><BR>and 
you have not done that in your script - that's definitely a concern.  
Perhaps looking at other scripts will help you - these are on the Deadcat and 
Xymonton here:<BR><A href="http://www.deadcat.net/">http://www.deadcat.net/</A><BR><A href="http://xymonton.trantor.org/doku.php">http://xymonton.trantor.org/doku.php</A><BR><BR>Josh 
Luthman<BR>Office: 937-552-2340<BR>Direct: 937-552-2343<BR>1100 Wayne 
St<BR>Suite 1337<BR>Troy, OH 45373<BR><BR>"When you have eliminated the 
impossible, that which remains, however improbable, must be the truth."<BR>--- 
Sir Arthur Conan Doyle<BR><BR><BR>
<DIV class=gmail_quote>On Mon, Nov 2, 2009 at 3:40 PM, Payam Jahromi <SPAN dir=ltr><<A href="mailto:pjahromi@checkpoint.com">pjahromi@checkpoint.com</A>></SPAN> 
wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
  <DIV lang=EN-US link="blue" vlink="purple">
  <DIV>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">I am a newbie to Hobbit, and this 
  is probably a simple question to answer. Here is what I’m trying to 
  do:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">I have custom scripts I need to 
  incorporate to Hobbit. I saw the page <A href="http://hobbitmon.sourceforge.net/docs/hobbit-tips.html#scripts" target=_blank>http://hobbitmon.sourceforge.net/docs/hobbit-tips.html#scripts</A> 
  but I still don’t completely understand it. If I could get 1 of my scripts set 
  up, then I can probably figure out how to do the rest.</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">I have 2 types of custom scripts: 
  client and server. Here is an example of each. I just need to know exactly how 
  the script would be set up. Note, I had these running on Nagios 
  before:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">1. (server) this is the custom 
  script we ran on our old monitoring (nagios):</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">#!/bin/sh</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">WEB_CHECK=`curl <A href="http://www.example.com" target=_blank>http://www.example.com</A> | grep 
  value | wc -l`</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">if [ $WEB_CHECK -eq 1 
  ]</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">   
  then</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">        
  echo "Result OK"</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">else</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">        
  echo "Failed"</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">        
  exit 2</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">fi</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">Question: Need to know how to 
  incorporate this on the hobbit server, and where it would show on the 
  GUI?</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">2. (client) this is custom script 
  that used “NRPE” on nagios:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">- I have a script that runs on 3 
  clients, let’s call it /usr/local/sbin/<A href="http://script.pl" target=_blank>script.pl</A></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">- this script returns an output 
  of a number</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">- on the hobbit server, I want to 
  be get the result of this script for each client, add them together, then 
  alert based on the number. So here is the script I had on the Nagios 
  server:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">#!/bin/sh</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"># Script to check transactions on 
  ecom-1/2</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">THRESHOLD=1</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">SERVER1=`ssh server1 
  /usr/local/nrpe/<A href="http://script.pl" target=_blank>script.pl</A>`</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">SERVER2=`ssh server2 
  /usr/local/nrpe/<A href="http://script.pl" target=_blank>script.pl</A>`</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">SERVER3=`ssh server3 
  /usr/local/nrpe/<A href="http://script.pl" target=_blank>script.pl</A>`</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">TOTAL=`expr $SERVER1 + $SERVER2 + 
  $SERVER3`</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">if [ $TOTAL -lt $THRESHOLD ] ; 
  then</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">     echo 
  "Number ($TOTAL) Failed"</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">     exit 
  2</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">else </SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">     echo 
  "Number ($TOTAL) Success"</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">     exit 
  0</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">fi</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">Question: How would I incorporate 
  that in Hobbit?</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">Thanks!</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Verdana size=1><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana">Payam</SPAN></FONT></P></DIV></DIV></BLOCKQUOTE></DIV><BR></FONT></P></BODY></HTML>