[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Trying to make graphs with bb-roracle.ksh 2.20
- To: hobbit (at) hswn.dk, fredbo (at) club-internet.fr
- Subject: Re: [hobbit] Trying to make graphs with bb-roracle.ksh 2.20
- From: Robert Herron <robert.herron (at) gmail.com>
- Date: Tue, 15 Dec 2009 18:11:56 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=P0sL34IUNRakSIKOslCOU22K/51lf6vYhxT8w1T+XrU=; b=Qoq2DhfxG3yOFszzY3MMT/xXsJ5svVG5bRLRTGjl+pivDFBTx5SSRuHr7cOqCsMf0q Aawh9+PNL+rbms9+Ye8oR7YxIKqYkBdpQmvzSRY6InvJnVGWyIUtVBrnJTj5ZgZGMFrH h4UW71aNAggjFNEMQ66Q0X/MNPz/udFwll5aw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=bCvIAHAp0inDxMoI9rtAiYIuIY9ylrasNeqR5nJwJqGjUHvWouX/LPpZakg/p7d+HF WIqlkemLcF0cKY7uxpbZ7WalDAd+JfAKYjd4rX0q2PQZSLaK0tT303pJN+ZH3ywjfC3+ NfFtCOHgAHDGLHgxca9hJowRnx6AZzjaw+wts=
Here's what I did:
In hobbitgraph.cfg add these two stanzas:
[oradb]
FNPATTERN oradb(.*).rrd
TITLE Oracle Tablespace Utilitzation
YAXIS % Full
DEF:p (at) RRDIDX@= (at) RRDFN@:pct:AVERAGE
LINE2:p (at) RRDIDX@# (at) COLOR@:@RRDPARAM@
-u 100
-l 0
GPRINT:p (at) RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:p (at) RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:p (at) RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:p (at) RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
[oradb1]
FNPATTERN oradb(.*).rrd
TITLE Oracle Tablespace Utilitzation
YAXIS Used(MB)
DEF:p (at) RRDIDX@= (at) RRDFN@:used:AVERAGE
LINE2:p (at) RRDIDX@# (at) COLOR@:@RRDPARAM@
-l 0
GPRINT:p (at) RRDIDX@:LAST:\: %5.1lf (cur)
GPRINT:p (at) RRDIDX@:MAX:\: %5.1lf (max)
GPRINT:p (at) RRDIDX@:MIN:\: %5.1lf (min)
GPRINT:p (at) RRDIDX@:AVERAGE:\: %5.1lf (avg)\n
In hobbitserver.cfg:
- Add oradb (or whatever you bb-roracle reports as) to the TEST2RRD line
- Add oradb and oradb1 to the GRAPHS line
In hobbitlaunch.cfg:
- Add "--extra-script=/home/hobbit/server/ext/extra_rrd.sh
--extra-tests=oradb" to the CMD line in [rrdstatus] stanza
- Add "--extra-script=/home/hobbit/server/ext/extra_rrd.sh
--extra-tests=oradb" to the CMD line in [rrdata] stanza
Create $BBHOME/server/ext/extra_rrd.sh as:
#!/bin/bash
# Input parameters: Hostname, testname (column), and messagefile
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"
case $TESTNAME in
oradb) # oradb
grep " Tablespace " $FNAME | grep -v "Tablespace check disabled" |
while read LINE
do
TSNAME=`echo $LINE | awk '{print $4}'`
TSSIZE=`echo $LINE | awk '{print $6}' | cut -f1 -d"M"`
#TSPCTUSED=`echo $LINE | awk '{print $9}'|cut -f1 -d"%"|cut -f2
-d">"`
TSPCTUSED=`echo $LINE | awk '$2 ~ /\&green/ {print $9}; $2 ~
/\&yellow/ {print $10}; $2 ~/\&red/ {print $10}' |cut -f1 -d"%"|cut -f2
-d">"`
TSUSED=`echo $TSSIZE $TSPCTUSED | awk '{print $1*$2/100}'`
# The RRD dataset definitions
echo "DS:pct:GAUGE:1200:0:100" #heartbeat = 1200 (20 minutes)
since bb-roracle runs 10 minutes -- Setting lower could cause gaps in graphs
echo "DS:used:GAUGE:1200:0:U" #heartbeat = 1200 (20 minutes)
since bb-roracle runs 10 minutes -- Setting lower could cause gaps in graphs
# The filename
echo "oradb,${TSNAME}.rrd"
echo "$TSPCTUSED:$TSUSED"
#echo "$TSNAME pctused=$TSPCTUSED-- used=$TSUSED--" >>
/tmp/oradb.rrd.out #debug/testing statement
done
*) exit 0
;;
esac
exit 0
#end of extra-rrd.sh
---------------
Robert Herron -- the "R.Herron" in bb-roracle.sh revision history.