Hi all
What am I doing wrong here. I have a custom script to generate tablespace information, and I want to graph the % utilization to spot trends.
My data looks like this, and displays nicely on Hobbit. Ah, before I forget, brilliant tool Henrik, thanks. You ever pop into Perth, there's a few cold ones waiting for you. :-)
Anyway, back to my data. It looks like this. ---snip--- <B>=============== Oracle Instance Check ================</B> &green Instances specified in ORACLE_SIDS (siebprod) match those found in /export/home/bb/bb/ext/ora9tab
<B>=================== siebprod Check ===================</B> &green Database siebprod UP processes: pmon smon lgwr dbw0 ckpt reco &green Paranoid test: Database siebprod is up.
<B>============= siebprod Tablespace Check ================</B> &green Tablespace siebprod:XDB totals 20.0Mb and is <B>0%</B> used. &green Tablespace siebprod:WHS_INDEX totals 700.0Mb and is <B>71%</B> used. &green Tablespace siebprod:WHS_DATA totals 700.0Mb and is <B>78%</B> used. &green Tablespace siebprod:USERS totals 100.0Mb and is <B>1%</B> used. &green Tablespace siebprod:UNDOTBS1 totals 5000.0Mb and is <B>27%</B> used. &green Tablespace siebprod:TOOLS totals 150.0Mb and is <B>66%</B> used. &green Tablespace siebprod:SYSTEM totals 500.0Mb and is <B>69%</B> used. &green Tablespace siebprod:SIEB_INDEX totals 52240.0Mb and is <B>81%</B> used. &green Tablespace siebprod:SIEB_DATA totals 40120.0Mb and is <B>84%</B> used. &green Tablespace siebprod:LOADER_DATA totals 500.0Mb and is <B>0%</B> used. ---snip---
I have a script, which chops it up, and returns this ---snip--- DS:siebprod.XDB:GAUGE:600:0:100 DS:siebprod.WHS_INDEX:GAUGE:600:0:100 DS:siebprod.WHS_DATA:GAUGE:600:0:100 DS:siebprod.USERS:GAUGE:600:0:100 DS:siebprod.UNDOTBS1:GAUGE:600:0:100 DS:siebprod.TOOLS:GAUGE:600:0:100 DS:siebprod.SYSTEM:GAUGE:600:0:100 DS:siebprod.SIEB_INDEX:GAUGE:600:0:100 DS:siebprod.SIEB_DATA:GAUGE:600:0:100 DS:siebprod.LOADER_DATA:GAUGE:600:0:100 OUTVAL=0:71:78:1:27:66:69:81:84:0 ---snip--- Which seems in line with the temperature example in the man pages. It also runs every few minutes.
Problems.
- Still no graph appears on the page
- No data is being written to the /var/lib/hobbit/rrd/<hostname>/*.rrd (well, not from my script anyway.)
What have I missed?
Any other info you might need. Client OS : Solaris Client monitor app : BigBrother (until further notice) Display server OS : Mandrake Linux Display monitor app : Hobbit (of course)
Cheers Vernon
P.S. Here's my script
---snip---
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"
if [ "$TESTNAME" = "ora9-sga" ]
then
echo $TESTNAME > /tmp/testnames # test stub remove later
cp $FNAME /tmp/ora9-sga.file
OUTVAL=""
cat $FNAME | grep "Tablespace" | grep -v "=====" | awk '{ print $3
" " $8 }'|
sed "s/<B>//g" | sed "s/%<\/B>//g" | sed "s/:/\./g" >
/tmp/stripped
while read TABLESPACE VAL
do
[ -n "$OUTVAL" ] && OUTVAL="$OUTVAL:"
echo "DS:$TABLESPACE:GAUGE:600:0:100"
echo "DS:$TABLESPACE:GAUGE:600:0:100" >> /tmp/newtest.out #
test stub remove later
OUTVAL=$OUTVAL$VAL
done < /tmp/stripped
rm /tmp/stripped
echo "tablespace.rrd"
echo "$OUTVAL"
echo "OUTVAL=$OUTVAL" >> /tmp/newtest.out # test stub remove later
fi
exit 0
NOTICE: This message and any attachments are confidential and may contain copyright material of Australian Finance Group Limited or a third party. It is intended solely for the purpose of the addressee and any other named recipient. If you are not the intended recipient, any use, distribution, disclosure or copying of this message is strictly prohibited. The confidentiality attached to this message is not waived or lost by reason of the mistaken transmission or delivery to any unintended party. If you have received this message in error, please notify the author immediately or contact Australian Finance Group on +61 8 9420 7888.
Hi Vernon,
On Fri, Apr 29, 2005 at 03:48:09PM +0800, Vernon Everett wrote:
I have a custom script to generate tablespace information, and I want to graph the % utilization to spot trends.
I have a script, which chops it up, and returns this ---snip--- DS:siebprod.XDB:GAUGE:600:0:100 DS:siebprod.WHS_INDEX:GAUGE:600:0:100 DS:siebprod.WHS_DATA:GAUGE:600:0:100 DS:siebprod.USERS:GAUGE:600:0:100 DS:siebprod.UNDOTBS1:GAUGE:600:0:100 DS:siebprod.TOOLS:GAUGE:600:0:100 DS:siebprod.SYSTEM:GAUGE:600:0:100 DS:siebprod.SIEB_INDEX:GAUGE:600:0:100 DS:siebprod.SIEB_DATA:GAUGE:600:0:100 DS:siebprod.LOADER_DATA:GAUGE:600:0:100 OUTVAL=0:71:78:1:27:66:69:81:84:0 ---snip---
The first part with all the "DS:..." defs look OK, but the last line is wrong.
Right after all the "DS:.." lines you must output the filename for the RRD file - "tablespace.rrd" or whatever suitable name you can think of.
Next goes the line with the values you've parsed. Leave out the "OUTVAL=" bit, it should ONLY be the values - nothing else.
And did you remember to setup a definition in hobbitgraph.cfg how this graph should be displayed ? Quoting my man-page:
Apart from writing the script, You must also add a section to
hobbitgraph.cfg(5) so that hobbitgraph.cgi(1)
knows how to generate the graph from the data stored in the
RRD file. To make the graphs actually show up on
the status-page and/or the "trends" page, add the
name of the new graph to the LARRDS and/or GRAPHS setting in
hobbitserver.cfg(5).
Ah, before I forget, brilliant tool Henrik, thanks. You ever pop into Perth, there's a few cold ones waiting for you. :-)
Thanks, will do if I manage to get down under sometime :-)
Henrik
participants (2)
-
henrik@hswn.dk
-
v.everett@afgonline.com.au