spew
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR $DT
$MYSQLADMIN --port=$port -u$user -p$pass extended-status | $GREP -i $var | $AWK '{print "Bytesrecevied:",$4}'
$MYSQLADMIN --port=$port -u$user -p$pass extended-status | $GREP -i $var2 | $AWK '{print "Bytessent:",$4}'
$MYSQLADMIN --port=$port -u$user -p$pass extended-status | $GREP $var3 | $AWK '{print "Connections:",$4}'
"
Hobbit Graph. Ugly Hobbit Graph.
[mysqltraffic] -w 640 -h 480 -W mysqltraffic TITLE MySQL Traffic YAXIS Bytes --units=si -o DEF:In=mysqltraffic.rrd:Bytesrecevied:AVERAGE DEF:Out=mysqltraffic.rrd:Bytessent:AVERAGE AREA:In#0000FF:Bytes In:STACK AREA:Out#33FF00:Bytes Out:STACK COMMENT:\n GPRINT:In:LAST:In\: %5.1lf%s (cur) GPRINT:In:MIN:\: %5.1lf%s (min) GPRINT:In:MAX:\: %5.1lf%s (max) GPRINT:In:AVERAGE:\: %5.1lf%s (avg)\n GPRINT:Out:LAST:Out\: %5.1lf%s (cur) GPRINT:Out:MIN:\: %5.1lf%s (min) GPRINT:Out:MAX:\: %5.1lf%s (max) GPRINT:Out:AVERAGE:\: %5.1lf%s (avg)\n
Good Luck,
-t
From: d.tom.schmitt at L-3com.com [d.tom.schmitt at L-3com.com] Sent: Wednesday, June 09, 2010 2:45 PM To: hobbit at hswn.dk Cc: Tim McCloskey Subject: RE: [hobbit] RE: Trying to create a graph
Tim, That worked for the example under HELP --> Custom Graphs. (slab works just fine ...) But, I am still having a problem getting a graph for my data.
Question:
You have a MSG= set but you don't send it in the
'status' message? You do send the pair space separated though.
I am sending about 8 lines of information from the MIBS
of the Juniper first. Then sending the PAIR of values.
I originally was doing a 'status' and then a 'data' 'bb'
command and that did not work.
After I have parsed the information, it looks like this when you
click the ICON (IP changed):
Wed Jun 9 15:33:59 MDT 2010
ON-LINE Appliance
SSLVPN2 at 128.170.68.3 is the ON-LINE Juniper SSL-VPN server ICON:online=GREEN
SNMP-Juniper.sh: Wed Jun 9 15:33:59 MDT 2010
INTERNAL VIRTUAL IP........: 128.170.999.999 ON-LINE
Appliance EXTERNAL VIRTUAL IP........: 128.170.888.889 DEVICE.....................: SSLVPN2 APPLIANCE IP...............: 128.170.999.999 NAME.......................: IVE2 CLR1=clear CLR2=green NUMBER OF WEB USERS........: 335 SOFTWARE VERSION...........: 6.5R2 (build 14951) COLOR......................: green GRAPH DATA.................: [USERS:335] LAST STATUS................: [IVE1=clear|IVE2=green|Wed Jun 9 15:28:57 MDT 2010] MAC ADDRESSES..............: 0:30:48:75:45:3c Internal-MAC 128.170.999.998 0:30:48:75:45:3d External-MAC 128.170.999.999
USERS : 335
The 'USERS : 335' is the value to use as a pair.
Here is the snippet of code where I send it in from: /home/xymon/client/ext/SNMP-Juniper.sh L=log-file
# Now we send the status message to Xymon
# ---------------------------------------
BB=/home/xymon/server/bin/bb
BBDISP=127.0.0.1
$BB $BBDISP "status $DEVICE.$COLUMN $COLOR `date`
${MSG2}
USERS : $USERS
"
RC=$?
if [ "$RC" -eq 0 ]; then
echo -e " Return Code from STATUS 'bb': 0"
$L else echo -e " Return Code from STATUS 'bb': $RC" $L fi
Here is the entry in /home/xymon/server/etc/hobbitlaunch.cfg: All other info about the other scripts has been removed.
[hobbitclient]
ENVFILE /home/xymon/client/etc/hobbitclient.cfg
NEEDS hobbitd
CMD /home/xymon/client/bin/hobbitclient.sh
LOGFILE $BBSERVERLOGS/hobbitclient.log
INTERVAL 5m
Entry in /home/xymon/server/etc/hobbitserver.cfg: TEST2RRD=" ... ,online=ncv, slab-ncv" And NCV_online="USERS:GAUGE" NCV_slab="inodecache:GAUGE,dentrycache:GAUGE"
IS 'online' the incorrect term?
Entry in /home/xymon/server/etc/hobbitgraph.cfg: # Tom Schmitt SNMP-Juniper.sh in ext directory [online] TITLE Count of Juniper Users YAXIS Users DEF:in=online.rrd:online:AVERAGE AREA:in#00CC00:Usage COMMENT:Licensed for 600 users\n GPRINT:in:LAST:Cur\: %6.2lf %s GPRINT:in:MAX: Max\: %6.2lf %s GPRINT:in:MIN: Min\: %6.1lf %s GPRINT:in:AVERAGE:Avg\: %6.2lf %s\n
End of SNMP-Juniper.sh graph
Tom Schmitt Xymon HELP --> Custom Graphs
[slab] TITLE Slab info YAXIS Bytes DEF:inode=slab.rrd:inodecache:AVERAGE DEF:dentry=slab.rrd:dentrycache:AVERAGE LINE2:inode#00CCCC:Inode cache LINE2:dentry#FF0000:Dentry cache COMMENT:\n GPRINT:inode:LAST:Inode cache \: %5.1lf%s (cur) GPRINT:inode:MAX: \: %5.1lf%s (max) GPRINT:inode:MIN: \: %5.1lf%s (min) GPRINT:inode:AVERAGE: \: %5.1lf%s (avg)\n GPRINT:dentry:LAST:Dentry cache\: %5.1lf%s (cur) GPRINT:dentry:MAX: \: %5.1lf%s (max) GPRINT:dentry:MIN: \: %5.1lf%s (min) GPRINT:dentry:AVERAGE: \: %5.1lf%s (avg)\n
End of Tom Schmitt Xymon HELP --> Custom Graphs
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT 84116
Phone (801) 594-3030
Cell (801) 231-7230
eFax (413) 480-6873
D.Tom.Schmitt at L-3Com.com
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message----- From: Tim McCloskey [mailto:tm at freedom.com] Sent: Wednesday, June 09, 2010 3:01 PM To: hobbit at hswn.dk Subject: RE: [hobbit] RE: Trying to create a graph
Tom,
For this test the hobbitserver is the client, so client/ext/somescript.sh is where the script is at. Sorry I completely missed that when looking at what you wrote!
So from client/etc/clientlaunch.cfg: [NA2CPU] ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg CMD $HOBBITCLIENTHOME/ext/na2.sh LOGFILE $HOBBITCLIENTHOME/logs/na2.log INTERVAL 2m
Script outputs same data format as yours
...
NA2CPU="$EGREP Busy $datafile | $AWK '{print $2}'"
if [ $NA2CPU -gt 78 ] then COLOR=red MSG="na2 CPU load is high"
fi
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR date
NA2CPU : ${NA2CPU} " ...
participants (1)
-
None