[hobbit] run bb-hostsvc.sh from command line

David Baldwin david.baldwin at ausport.gov.au
Sun Feb 21 23:46:05 CET 2010


pkc_mls wrote:
> Hi all,
>
> As far as I can remember, there is a way to run the script bb-hostsvc.sh
>  directly from command line after setting a specific var in the shell.
>
> Could anyone please remind me of the var to set ?
>   

It took me a while to work out a testing harness for debugging a CGI script last year, but I came up with the following shell script when I was trying to work out why graphs weren't properly appearing in trends (missing lines, etc):

#!/bin/sh
. /usr/lib/hobbit/server/etc/hobbitcgi.cfg
HOST=$1
SERVICE=trends
env REQUEST_URI=/hobbit-cgi/bb-hostsvc.sh?HOST=${HOST}\&SERVICE=$SERVICE
SCRIPT_NAME=/hobbit-cgi/bb-hostsvc.sh
QUERY_STRING=HOST=${HOST}\&SERVICE=$SERVICE REQUEST_METHOD=GET
/usr/lib/hobbit/server/bin/hobbitsvc.cgi $CGI_SVC_OPTS --debug



The debug output would show me the rrd files as they were found, and
allowed me to pin down that the graph name had to match the start of the
RRD filename.



-- 
David Baldwin - IT Unit
Australian Sports Commission          www.ausport.gov.au
Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616
david.baldwin at ausport.gov.au          Leverrier Street Bruce ACT 2617


-------------------------------------------------------------------------------------
Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au

This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.
-------------------------------------------------------------------------------------



More information about the Xymon mailing list