[hobbit] Problems with custom RRD graphs

Andy France Andy at zespri.com
Thu Feb 17 11:11:11 CET 2005





Henrik Stoerner <henrik at hswn.dk> wrote on 17/02/2005 19:55:57:

> On Thu, Feb 17, 2005 at 01:24:55PM +1300, Andy France wrote:

> > I've written my --extra-script (based on the sample in the
hobbitd_larrd
> > man page) and added this as well my columns for the --extra-tests in
> > hobbitlaunch.cfg under the larrdstatus command.

> Brave man - you're  the first to try out this mechanism for real:-)


Wheeeeeeeee!  Bring on the pain!  ;-)


> > My script is getting executed OK.  I've added some debug messages which
get
> > appended to a log file and most things are running as expected.
However,
> > I'm getting no actual data, no rrd files and no graphs :-(
> >
> > It seems the the $FNAME parameter is not giving me what it shoud, and
this
> > is causing my tests to echo the DS line, the rrd file name, but an
empty
> > data string.


Quite the opposite it turns out.  I added some extra debug lines to cat $3
- lo and behold, there was my expected output in all its glory.  My bad.

Once I *fixed my grep* I started getting data and rrd files ( I was
grepping for text at the start of the line, but the report included a
leading space).

Of course, my original "cp $FNAME /tmp/$FNAME.$TESTNAME.$$" in debug wasn't
working because I didn't basename $FNAME first.  Duh.


My remaining problem is that after colecting a few data points, I still
have no graphs on the test pages or the trends page.  I'm off to bed now
and will re-check tomorrow morning.  But if you know of anything else I may
have missed please let me know!  Should bb-hostsvc.sh pick it up
automagically?


> Some shell's do have slightly different syntax than what the example
> script in the man-page shows.  You could try just echo'ing the input
> parameters to some file and see what they are. Like

> echo "Input 1: $1" > /tmp/params.txt
> echo "Input 2: $2" >>/tmp/params.txt
> echo "Input 3: $3" >>/tmp/params.txt
>
> at the top of your script (before they get put into the $FNAME etc).

> > I'm running 4.0-RC2 on Solaris 9 x86.

> Something in the back of my head says: Could you try putting the
> input params inside curly brackets ? Instead of

> HOSTNAME="$1"
> TESTNAME="$2"
> FNAME="$3"
>
> try
> HOSTNAME="${1}"
> TESTNAME="${2}"
> FNAME="${3}"
>
> Henrik

This wasn't an issue of course - plain old $1, $2 and $3 are fine.

Thanks for the help (and of course the awesome tool).

On to Oracle data... and maybe some c modules to replace my script.

Cheers,
Andy.


#####################################################################################

This email is intended for the person to whom it is addressed
only. If you are not the intended recipient, do not read, copy
or use the contents in any way. The opinions expressed may not
necessarily reflect those of ZESPRI Group of Companies ('ZESPRI').

While every effort has been made to verify the information
contained herein, ZESPRI does not make any representations 
as to the accuracy of the information or to the performance
of any data, information or the products mentioned herein.
ZESPRI will not accept liability for any losses, damage or
consequence, however, resulting directly or indirectly from
the use of this e-mail/attachments.
#####################################################################################



More information about the Xymon mailing list