I don't know what is wrong, but I debugged my custom scripts using these methods:
A) I changed my script to save the temporary file.
B) I run the "catcher" by hand using the temporary file as input, and review the output.
There are many variations you can use. For instance, you can simply grab and save the text in the Web page for your new test, and this will be essentially the same as what is in the temporary file that you are given.
You can also add a log file mechanism for the script, and add whatever you want to it. Make sure you don't put in too much and forget about, since Hobbit will tirelessly run your script every 5 minutes until the 12th of Never or your computer croaks, whichever comes first.
GLH
-----Original Message----- From: Gada, Subhash [mailto:subhash.gada at logicacmg.com] Sent: Monday, March 20, 2006 5:14 AM To: hobbit at hswn.dk Subject: [hobbit] RRD error in updating the rrd files
Hi,
I have written a script to create rrd files for custom test called as 'printq'
The data which comes to hobbit for the 'printq' test is random.
So I have decided to generate separate rrd file for each value.
I could see the following error in the rrd status log.
2006-03-20 16:40:07 RRD error updating /home/hobbit/data/rrd/xx.xxxxxx.com/printq,PRN095.rrd from xxx.xxx.xxx.xxx: expected 1 data source readings (got 2) from 1142853006:0:U:... 2006-03-20 16:40:07 RRD error updating /home/hobbit/data/rrd/xx.xxxxxx.com/printq,PRN096.rrd from xxx.xxx.xxx.xxx: expected 1 data source readings (got 2) from 1142853006:0:U:...
Can any one please let me know what is going wrong in updating the rrd files.
The script is as follows.
#!/bin/sh
Input parameters: Hostname, testname (column), and messagefile
HOSTNAME="$1" TESTNAME="$2" FNAME="$3"
if [ "$TESTNAME" = "printq" ] then
cat $FNAME |
while read line
do
#Value
v=echo $line | grep "^PRN...:" | awk -F: '{print $2}'
#DS names
dsn=echo $line |grep "^PRN...:" | awk -F: '{print $1}'
The RRD dataset definitions
echo "DS:printq:GAUGE:600:0:U"
The filename
echo "printq,$dsn.rrd"
echo $v
done
fi
exit 0
Regards Subhash
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk