External scripts not working the same?
list Stewart Larsen
Greetings, We are looking at migrating from BB to Hobbit. One major stumbling block right now is that we have over 400 devices on the network right now that we monitor via SNMP. Firewalls, Routers, proxies, etc. 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. This doesn't seem to be possible in hobbit. Every reference I've seen in the archives has told people to use hobbitlaunch. 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? Little help for a newbie to Hobbit? Stewart
list Jason Chambers
Correct me if I'm wrong, but shouldn't your script be parsing the bb-hosts file for the router_test tag? If that's the case, then it should run fine. Unless you are statically defining your tests. Jason Chambers IT Helpdesk Support Geosoft Inc. XX Richmond St. West - 8th Floor Toronto, Ontario, Canada M5H 2C9 Tel: XXX-XXX-XXXX x344 Fax: XXX-XXX-XXXX www.geosoft.com -----Original Message----- From: user-6f5382941e41@xymon.invalid [mailto:user-6f5382941e41@xymon.invalid] Sent: Tuesday, October 25, 2005 12:51 PM To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] External scripts not working the same?
▸
Greetings,
We are looking at migrating from BB to Hobbit. One major stumbling block
right now is that we have over 400 devices on the network right now that
we monitor via SNMP. Firewalls, Routers, proxies, etc.
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. This doesn't seem to be
possible in hobbit. Every reference I've seen in the archives has told
people to use hobbitlaunch.
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?
Little help for a newbie to Hobbit?
Stewart
list Richard Deal
Are you using the snmp script from deadcat or maybe the bb-xsnmp.pl
script?
In any case hobbitlaunch runs things generally every 5 minutes.
Here are some examples that I have added to the hobbitlaunch.cfg on the
server:
[aironet]
ENVFILE
/local/packages/IT/HOBBIT/hobbit/client/etc/hobbitclient.cfg
NEEDS hobbitd
CMD /local/packages/IT/HOBBIT/hobbit/server/ext/aironet.pl
LOGFILE $BBSERVERLOGS/aironet.log
INTERVAL 5m
[snmp]
ENVFILE
/local/packages/IT/HOBBIT/hobbit/client/etc/hobbitclient.cfg
NEEDS hobbitd
CMD /local/packages/IT/HOBBIT/hobbit/server/ext/snmp
LOGFILE $BBSERVERLOGS/snmp.log
INTERVAL 5m
This has the server run these two scripts (snmp and aironet.pl) every 5
minutes (from the INTERVAL line), and sets the environment from the
hobbitclient.cfg file.
▸
-----Original Message-----
From: user-6f5382941e41@xymon.invalid
[mailto:user-6f5382941e41@xymon.invalid]
Sent: Tuesday, October 25, 2005 12:51 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] External scripts not working the same?
Greetings,
We are looking at migrating from BB to Hobbit. One major stumbling block
right now is that we have over 400 devices on the network right now that
we monitor via SNMP. Firewalls, Routers, proxies, etc.
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. This doesn't seem to be
possible in hobbit. Every reference I've seen in the archives has told
people to use hobbitlaunch.
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?
Little help for a newbie to Hobbit?
Stewart
list Stewart Larsen
It is not doing that right now. I could easily rewrite it to do so, but that is not the ideal solution. Basically, you pass it an IP address, it performs the tests and calls bb to send the status to the server. Stewart
▸
-----Original Message-----
From: Jason Chambers [mailto:user-3fa671c0a30d@xymon.invalid]
Sent: Tuesday, October 25, 2005 12:57 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] External scripts not working the same?
Correct me if I'm wrong, but shouldn't your script be parsing the
bb-hosts file for the router_test tag? If that's the case, then it
should run fine. Unless you are statically defining your tests.
Jason Chambers
IT Helpdesk Support
Geosoft Inc.
XX Richmond St. West - 8th Floor
Toronto, Ontario, Canada
M5H 2C9
Tel: XXX-XXX-XXXX x344
Fax: XXX-XXX-XXXX
www.geosoft.com
-----Original Message-----
From: user-6f5382941e41@xymon.invalid
[mailto:user-6f5382941e41@xymon.invalid]
Sent: Tuesday, October 25, 2005 12:51 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] External scripts not working the same?
Greetings,
We are looking at migrating from BB to Hobbit. One major stumbling block
right now is that we have over 400 devices on the network right now that
we monitor via SNMP. Firewalls, Routers, proxies, etc.
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. This doesn't seem to be
possible in hobbit. Every reference I've seen in the archives has told
people to use hobbitlaunch.
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?
Little help for a newbie to Hobbit?
Stewart
-- BEGIN-ANTISPAM-VOTING-LINKS Teach CanIt if this mail (ID 49400092) is spam: Spam: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=s&i=49400092&m=62354c87c f96 Not spam: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=n&i=49400092&m=62354c87c f96 Forget vote: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=f&i=49400092&m=62354c87c f96 END-ANTISPAM-VOTING-LINKS
list Jason Chambers
Most scripts I've seen on deadcat.net will parse for the test you called for then run it. Thankfully hobbit comes with a nifty little util that will return hosts/ips that have that test name for you. All you have to do then is have a script run through a loop with that list and test them all. I can't remember what that util is called, but I read it in the manuals somewhere.
▸
Jason Chambers
IT Helpdesk Support
Geosoft Inc.
XX Richmond St. West - 8th Floor
Toronto, Ontario, Canada
M5H 2C9
Tel: XXX-XXX-XXXX x344
Fax: XXX-XXX-XXXX
www.geosoft.com
-----Original Message-----
From: user-6f5382941e41@xymon.invalid
[mailto:user-6f5382941e41@xymon.invalid]
Sent: Tuesday, October 25, 2005 1:03 PM
▸
To: user-ae9b8668bcde@xymon.invalid Subject: RE: [hobbit] External scripts not working the same? It is not doing that right now. I could easily rewrite it to do so, but that is not the ideal solution. Basically, you pass it an IP address, it performs the tests and calls bb to send the status to the server. Stewart -----Original Message----- From: Jason Chambers [mailto:user-3fa671c0a30d@xymon.invalid] Sent: Tuesday, October 25, 2005 12:57 PM To: user-ae9b8668bcde@xymon.invalid Subject: RE: [hobbit] External scripts not working the same? Correct me if I'm wrong, but shouldn't your script be parsing the bb-hosts file for the router_test tag? If that's the case, then it should run fine. Unless you are statically defining your tests. Jason Chambers IT Helpdesk Support Geosoft Inc. XX Richmond St. West - 8th Floor Toronto, Ontario, Canada M5H 2C9 Tel: XXX-XXX-XXXX x344 Fax: XXX-XXX-XXXX www.geosoft.com -----Original Message----- From: user-6f5382941e41@xymon.invalid [mailto:user-6f5382941e41@xymon.invalid] Sent: Tuesday, October 25, 2005 12:51 PM To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] External scripts not working the same? Greetings, We are looking at migrating from BB to Hobbit. One major stumbling block right now is that we have over 400 devices on the network right now that we monitor via SNMP. Firewalls, Routers, proxies, etc. 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. This doesn't seem to be possible in hobbit. Every reference I've seen in the archives has told people to use hobbitlaunch. 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? Little help for a newbie to Hobbit? Stewart -- BEGIN-ANTISPAM-VOTING-LINKS Teach CanIt if this mail (ID 49400092) is spam: Spam: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=s&i=49400092&m=62354c87c f96 Not spam: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=n&i=49400092&m=62354c87c f96 Forget vote: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=f&i=49400092&m=62354c87c f96 END-ANTISPAM-VOTING-LINKS
list Lars Ebeling
The program is: bbhostgrep. You find a description how to use it in Tips and tricks. under section How can I create a custom test script? Regards Lars Ebeling
▸
----- Original Message ----- From: "Jason Chambers" <user-3fa671c0a30d@xymon.invalid> To: <user-ae9b8668bcde@xymon.invalid> Sent: Tuesday, October 25, 2005 7:10 PM Subject: RE: [hobbit] External scripts not working the same? Most scripts I've seen on deadcat.net will parse for the test you called for then run it. Thankfully hobbit comes with a nifty little util that will return hosts/ips that have that test name for you. All you have to do then is have a script run through a loop with that list and test them all. I can't remember what that util is called, but I read it in the manuals somewhere. Jason Chambers IT Helpdesk Support Geosoft Inc. XX Richmond St. West - 8th Floor Toronto, Ontario, Canada M5H 2C9 Tel: XXX-XXX-XXXX x344 Fax: XXX-XXX-XXXX www.geosoft.com -----Original Message----- From: user-6f5382941e41@xymon.invalid [mailto:user-6f5382941e41@xymon.invalid] Sent: Tuesday, October 25, 2005 1:03 PM To: user-ae9b8668bcde@xymon.invalid Subject: RE: [hobbit] External scripts not working the same? It is not doing that right now. I could easily rewrite it to do so, but that is not the ideal solution. Basically, you pass it an IP address, it performs the tests and calls bb to send the status to the server. Stewart -----Original Message----- From: Jason Chambers [mailto:user-3fa671c0a30d@xymon.invalid] Sent: Tuesday, October 25, 2005 12:57 PM To: user-ae9b8668bcde@xymon.invalid Subject: RE: [hobbit] External scripts not working the same? Correct me if I'm wrong, but shouldn't your script be parsing the bb-hosts file for the router_test tag? If that's the case, then it should run fine. Unless you are statically defining your tests. Jason Chambers IT Helpdesk Support Geosoft Inc. XX Richmond St. West - 8th Floor Toronto, Ontario, Canada M5H 2C9 Tel: XXX-XXX-XXXX x344 Fax: XXX-XXX-XXXX www.geosoft.com -----Original Message----- From: user-6f5382941e41@xymon.invalid [mailto:user-6f5382941e41@xymon.invalid] Sent: Tuesday, October 25, 2005 12:51 PM To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] External scripts not working the same? Greetings, We are looking at migrating from BB to Hobbit. One major stumbling block right now is that we have over 400 devices on the network right now that we monitor via SNMP. Firewalls, Routers, proxies, etc. 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. This doesn't seem to be possible in hobbit. Every reference I've seen in the archives has told people to use hobbitlaunch. 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? Little help for a newbie to Hobbit? Stewart -- BEGIN-ANTISPAM-VOTING-LINKS Teach CanIt if this mail (ID 49400092) is spam: Spam: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=s&i=49400092&m=62354c87c f96 Not spam: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=n&i=49400092&m=62354c87c f96 Forget vote: https://dohsmsi01.doh.state.fl.us/canit/b.php?c=f&i=49400092&m=62354c87c f96 END-ANTISPAM-VOTING-LINKS
list Henrik Størner
▸
On Tue, Oct 25, 2005 at 12:50:57PM -0400, user-6f5382941e41@xymon.invalid 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
list Henrik Størner
▸
On Tue, Oct 25, 2005 at 10:55:35PM +0200, Henrik Stoerner wrote:
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.
A first attempt at implementing this is included in the latest snapshot, available at http://www.hswn.dk/beta/ - or, to just pick up the new utility, grab http://www.hswn.dk/beta/snapshot/common/bbhostgrep.c Just drop this file into the hobbit-4.1.2/common/ directory and run "make". This adds a new "--no-down" option to bbhostgrep. This causes it to query the Hobbit server for information about the hosts that have a non-green "conn" column (ping test); these hosts are ignored and will not show up in the output from bbhostgrep. You can also use "--no-down=SOMETEST". bbhostgrep will then also query the Hobbit server for the current state of the SOMETEST column for all hosts; if this column for a host has status blue (disabled), then that host will also be ignored. Note that this is in addition to the "conn" check. Regards, Henrik
list Thomas Pedersen
Could we avoid the test on the conn tag when specifying the --no-down=TAG because I have systems that I am not allowed to ping but stil have to do other tests towards. Could the conn be the default and then if I specify another tag this is the only tag tested for ? /Thomas
▸
Henrik Stoerner wrote:
On Tue, Oct 25, 2005 at 10:55:35PM +0200, Henrik Stoerner wrote: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.A first attempt at implementing this is included in the latest snapshot, available at http://www.hswn.dk/beta/ - or, to just pick up the new utility, grab http://www.hswn.dk/beta/snapshot/common/bbhostgrep.c Just drop this file into the hobbit-4.1.2/common/ directory and run "make". This adds a new "--no-down" option to bbhostgrep. This causes it to query the Hobbit server for information about the hosts that have a non-green "conn" column (ping test); these hosts are ignored and will not show up in the output from bbhostgrep. You can also use "--no-down=SOMETEST". bbhostgrep will then also query the Hobbit server for the current state of the SOMETEST column for all hosts; if this column for a host has status blue (disabled), then that host will also be ignored. Note that this is in addition to the "conn" check. Regards, Henrik
list Henrik Størner
▸
On Wed, Oct 26, 2005 at 09:24:20AM +0200, Thomas wrote:
Could we avoid the test on the conn tag when specifying the --no-down=TAG because I have systems that I am not allowed to ping but stil have to do other tests towards. Could the conn be the default and then if I specify another tag this is the only tag tested for ?
If there's no "conn" status for a host, then bbhostgrep won't do the check of the conn-test for that host. The one thing that might trip things up is if you use "noping", and there's a "clear" conn-status. A "clear" status can show up for number of reasons - a host that is up, but has a "noping" tag to disable ping, or a host that is down, but has a "dialup" tag. Perhaps I should change it to only ignore a host if there is a conn test that is either red or blue - i.e. we know for sure that this host is either down (red), or disabled (blue). Henrik