[hobbit] How to run an arbitary script on the client end?

Haertig, David F (Dave) haertig at avaya.com
Fri Jun 8 23:12:45 CEST 2007


Thanks.  Your suggestion triggered an idea on how to do this.
client-local.cfg supports backticks to run a program to generate a
logfile name dynamically.  So I'll try to make use of that and do
something like this (haven't tested it yet):
 
Add to client-local.cfg
================
 
log:`/path/to/the/program 2>&1 1>/path/to/the/logfile; echo
/path/to/the/logfile`
 
If this exact syntax won't work, it should be easy to use some similar
concept.  The built-in backtick processing of the log: directive being
the key point.
 
Thanks!

________________________________

From: Charles Jones [mailto:jonescr at cisco.com] 
Sent: Friday, June 08, 2007 2:49 PM
To: hobbit at hswn.dk
Subject: Re: [hobbit] How to run an arbitary script on the client end?


As far as I know there is no built-in functionality to dynamically
execute remote scripts and get their output. Others may have better
suggestions, but one way of doing it, is you could set the client-side
script to be launched by the hobbit client every X minutes, (via
clientlaunch.cfg). I'm not sure of the best way to get the script output
back to the hobbit server though. I guess you could have the script
output to a logfile , and then have the hobbit server monitor that log
via the normal log monitoring mechanism
. 
-Charles

Haertig, David F (Dave) wrote: 

	Is there a way to confgure a client, via client-local.cfg or
otherwise, to run some arbitrary command on the client and send it's
stdout/stderr back to the hobbit server?  I have a few simple shell
scripts that exist on some clients that it would be nice to invoke and
then read their results on the server end using the "$BBHOME/bin/bb
localhost clientlog..." method.  Similar to the way a
"file:path_to_file" <file:path_to_file>  directive will collect a file's
metadata?  I want something like "runprogram:path_to_program"
	 
	I am doing this currently using a server-side script that ssh'es
to the client machine and runs what it needs.  I would rather have the
normal Hobbit client collect the data output by the client-side program,
upload that, and my server-side script would parse that resulting
clientlog rather than going and collecting it's own data.  If this is
possible.
	 
	Thanks!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20070608/a1da3adb/attachment.html>


More information about the Xymon mailing list