[hobbit] External scripts not working the same?
Henrik Stoerner
henrik at hswn.dk
Tue Oct 25 22:55:35 CEST 2005
On Tue, Oct 25, 2005 at 12:50:57PM -0400, Stewart_Larsen at doh.state.fl.us wrote:
>
> Our basic script in BB was under the ext folder on the server and was
> run every 5 minutes when bbtest-net ran. An instance of this script was
> called for each device we needed checked. It pulled the IP address of
> the device from the environment variables and called the bb executable
> with it's result when the test was completed.
I'm a bit puzzled by this description, because it doesn't match any of
the ways I know of that BB uses to run extension scripts. BB will
- if you add a script to the bb-bbexttab config - run the script once
per cycle, not once for each host. bbtest-net (from bbgen, I presume)
doesn't change that; in fact, there's nothing in bbtest-net that would
ever trigger an extension-script.
So I would guess that some custom modification has been done to your
BB setup - or to bbtest-net - which takes care of this particular way
of invoking the SNMP polling script once per host.
> This doesn't seem to be possible in hobbit. Every reference I've seen
> in the archives has told people to use hobbitlaunch.
Right. hobbitlaunch really is just a utility to launch programs at
regular intervals, with some specific environment setup, redirection
of logfiles and such.
> Unless I'm misunderstanding things (which is possible...), I can tell
> hobbitlaunch to fire off my external script every 5 minutes, but the
> script will only run that one time, meaning I'd have to modify my script
> to run a loop through all of the devices that I want the test run for.
> This is not really the way we want to go, because then it ignores the
> hosts that are planned down for maintenance and such.
>
> What I'd like to do is add a service tag in the bbhost file called
> router_test. Then, when the network tests are run, hobbit should be
> smart enough to know that there is an external script defined in
> hobbitlaunch.cfg that matches that tag and run it for that machine. Is
> this possible?
As others have said, it is pretty simple to cook up a script that
grabs the hosts that have a specific tag in the bb-hosts file, and
run you SNMP polling script against those hosts. There's a "boiler-
plate" script listed in the Hobbit "Tips & Tricks" web-document that
you can easily adapt to suit your needs.
The tricky part is your idea about tying this in with the other
network tests, to avoid polling the hosts that are down or disabled.
I can understand why (I know how long snmpget takes to timeout a
request) ... it's just an idea that I haven't heard before.
I think it's a great idea - it would certainly be useful for exactly
this kind of test where you want to avoid testing unreachable systems.
Adding this kind of filter to bbhostgrep should not be terribly
difficult - stay tuned.
Regards,
Henrik
More information about the Xymon
mailing list