Cayo de Moraes wrote:
nobody knows anything about it?
any help would be appreciated.
2009/11/18 Cayo de Moraes <user-92aec3b3c467@xymon.invalid
Hi guys,
just like we use the file hobbit-clients.cfg to manage DISK, CPU,
PROCS etc. for each client, we would like to have a centralized
configuration for the external scripts.
So far I tested two things:
1) Server-side check:
bb-hosts entry (for the external scripts), additional code entry
in the external scripts (for bbhostgrep), etc.
Problem: this seems to work only with "Network checks" which will
be done from Server-side to check the clients, like advanced
ftp/ping/ssh script etc. It doesnt work for scripts, wich have to
run on the clients, like mysql checks.
2) ONHOST:
the entry ONHOST in the hobbitlaunch.cfg.
Problem: this is not working for me... i tought with this entry
Hobbit would be able to issue an order to the client and then
execute the command in the client, but when looking into the
logfiles, i see that Hobbit have to find the external script on
the Hobbit-Server (i think its the same result as in Problem 1). I
tought it would work as a "bb-bbextab"... but the MAN Pages says
it has to be configured on the server....
So guys, do i have another way to manage this external scripts
(which have to be run on the clients) in the Hobbit-Server?
TIA,
Cayo
If you want to configure script running on the clients (remotely) from
the Hobbit server, I think you have two options. Both will require a
little bit of coding in your client side.
1) You can arrange (maybe write a small script to do it periodically) to
run something like:
$BB $BBDISP "config myconfigfile"
(see the man page for the "bb" command). The idea is to add custom
configurations to this "myconfigfile" in your server/etc directory, and
use this command on the clients to update a local copy onto the client.
You script can then parse this as desired.
2) You can use the client-local.cfg on the server to send out custom
configurations, as well. For a particular hostname or class entry in
there, you can add a line with some parameters... say something like:
[myhost]
log:/var/log/messages:10240
myconfig:something=1280 somethingelse=foo
Note that the client will pull the first matching block from
client-local.cfg back when it contacts the server to send test results.
The client-local block will get saved on your client in a file under
$BBTMP, in a file named like "logfetch.hostname.cfg."
You could use this mechanism to get configurations to your client, by
looking for your lines in this file (starting with "myconfig:"), and
parsing it for your configurations.
Hope this gives you some starting ideas.
-Alan