[hobbit] custom scripts

Josh Luthman josh at imaginenetworksllc.com
Tue Nov 3 00:53:42 CET 2009


1.
Look at http://xymon.com/hobbit-cgi/viewconf.sh
172.16.10.5 miro.hswn.dk # ssh http://miro.hswn.dk/

Then look at the miro.hswn.dk server under the http column here:
http://xymon.com/hobbit/servers/servers.html

Just put your information in.  No custom script needed.

2.
I can't help with custom scripts but the document expressed you need to...

# Tell Hobbit about it
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`

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:
http://www.deadcat.net/
http://xymonton.trantor.org/doku.php

Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373

"When you have eliminated the impossible, that which remains, however
improbable, must be the truth."
--- Sir Arthur Conan Doyle


On Mon, Nov 2, 2009 at 3:40 PM, Payam Jahromi <pjahromi at checkpoint.com>wrote:

>  I am a newbie to Hobbit, and this is probably a simple question to
> answer. Here is what I’m trying to do:
>
>
>
> I have custom scripts I need to incorporate to Hobbit. I saw the page
> http://hobbitmon.sourceforge.net/docs/hobbit-tips.html#scripts 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.
>
>
>
> 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:
>
>
>
> 1. (server) this is the custom script we ran on our old monitoring
> (nagios):
>
> #!/bin/sh
>
>
>
> WEB_CHECK=`curl http://www.example.com | grep value | wc -l`
>
>
>
> if [ $WEB_CHECK -eq 1 ]
>
>    then
>
>         echo "Result OK"
>
> else
>
>         echo "Failed"
>
>         exit 2
>
> fi
>
>
>
> Question: Need to know how to incorporate this on the hobbit server, and
> where it would show on the GUI?
>
>
>
> 2. (client) this is custom script that used “NRPE” on nagios:
>
> - I have a script that runs on 3 clients, let’s call it /usr/local/sbin/
> script.pl
>
> - this script returns an output of a number
>
> - 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:
>
> #!/bin/sh
>
> # Script to check transactions on ecom-1/2
>
>
>
> THRESHOLD=1
>
> SERVER1=`ssh server1 /usr/local/nrpe/script.pl`
>
> SERVER2=`ssh server2 /usr/local/nrpe/script.pl`
>
> SERVER3=`ssh server3 /usr/local/nrpe/script.pl`
>
>
>
> TOTAL=`expr $SERVER1 + $SERVER2 + $SERVER3`
>
>
>
>
>
> if [ $TOTAL -lt $THRESHOLD ] ; then
>
>      echo "Number ($TOTAL) Failed"
>
>      exit 2
>
> else
>
>      echo "Number ($TOTAL) Success"
>
>      exit 0
>
> fi
>
>
>
> Question: How would I incorporate that in Hobbit?
>
>
>
> Thanks!
>
> Payam
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20091102/afd95090/attachment.html>


More information about the Xymon mailing list