External scripts help

Vernon Everett v.everett at afgonline.com.au
Fri Apr 29 09:48:09 CEST 2005


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.
1. Still no graph appears on the page
2. 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.




More information about the Xymon mailing list