[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [hobbit] SCRIPT using expect
- To: <hobbit (at) hswn.dk>
- Subject: RE: [hobbit] SCRIPT using expect
- From: "Hubbard, Greg L" <greg.hubbard (at) eds.com>
- Date: Thu, 31 Jul 2008 10:57:23 -0500
- References: <g6sjk7$1ki$1 (at) ger.gmane.org>
- Thread-index: AcjzHgdqAUMAP8aTSi224Tln2VuZzAABuHPw
- Thread-topic: [hobbit] SCRIPT using expect
Eric,
You need to make sure that your script sets up its own environment prior
to running because the Hobbit server may not have the same settings as
what you have when you develop the script. This is the same issue that
you would have to conquer if you were to put the script under cron.
Secondly, you probably need to write a "director" script that is invoked
through the alert rule, and let it examine the parameters in order to
determine which "worker" script to call. I think this is the only way
to run a different script when something has recovered. You also must
take into account that you will get recovered messages even if no alert
was sent.
You should probably diagram out the whole thing from one end to the
other -- e.g.
Something breaks
Hobbit test X goes to color C1
my script is run for test X, color C1
My script does something to resolve the problem
Hobbit text X goes to color C2
My script is run for test X, color C1, resolved.
Etc.
GLH
-----Original Message-----
From: news [mailto:news (at) ger.gmane.org] On Behalf Of Eric Jacobs
Sent: Thursday, July 31, 2008 9:53 AM
To: hobbit (at) hswn.dk
Subject: [hobbit] SCRIPT using expect
I have been asked by those who must be obeyed to see if I can get Hobbit
to make a configuration change on a switch if a certain connection test
goes red. Been trying to do so via an "expect" script. Script runs fine
when run manually but fails from within Hobbit. First attempt failed
because script apparently didn't wait long enough after spawning a
telnet session. So I slowed it down and it got session started but
apparently didn't "send"
password. Has anyone done anything like this?
Even if I get it to work, a few other questions arise.
1. Will it continue to run script if connection failure continues?
2. If I turn "RECOVER" on, can I run an alternate script upon recovery?
Eric Jacobs
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk