Hello,<br><br>For sending data to Hobbit, I add this line at the end of the script:<br><br>#send the results to hobbit so it can be graphed<br>$BB $BBDISP "status $MACHINE.$COLUMN $status `date`<br><br>        disco0 : $hd0 C $st0
<br>        disco1 : $hd1 C $st1<br><br><br>"<br>exit 0<br><br>disco0 and disco1 are de names of the variables I have put in hobbitgraph.<br><br><br><div><span class="gmail_quote">2007/7/2, Matt <<a href="mailto:mlist@cmcflex.com">
mlist@cmcflex.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Finally kind of figured out this fancy rrd graphing business (oh man is
<br>it sweet).  Problem though, I can't seem to get my graph to populate in<br>the trends column - it will populate in it's own column (should the<br>client use the status channel).  Here are the relevant parts of each
<br>config file.<br><br>hobbitgraph.cfg<br><br>[fans]<br>        TITLE Fan Speeds<br>        YAXIS RPM<br>        DEF:one=cpufan1.rrd:cpufan1:AVERAGE<br>        #DEF:cpufan2=cpufan2.rrd:cpufan2:AVERAGE<br>        GPRINT:one:LAST:CPU0 Fan \: %5.1lf (cur)
<br>        GPRINT:one:MAX: \: %5.1lf (max)<br>        GPRINT:one:MIN: \: %5.1lf (min)<br>        GPRINT:one:AVERAGE: \: %5.1lf (avg)\n<br>        #GPRINT:cpufan2:LAST:CPU1 Fan \: %5.1lf (cur)<br>        #GPRINT:cpufan2:MAX: \: %5.1lf (max)
<br>        #GPRINT:cpufan2:MIN: \: %5.1lf (min)<br>        #GPRINT:cpufan2:AVERAGE: \: %5.1lf (avg)\n<br>        LINE2:one#FF0000:CPU0 Fan<br>        #LINE2:cpufan2#1048FF:CPU1 Fan<br><br><br><a href="http://client.script.sh">
client.script.sh</a><br><br>#!/bin/sh<br><br># Input parameters: Hostname, testname (column), and messagefile<br>HOSTNAME="$1"<br>TESTNAME="$2"<br>FNAME="$3"<br><br>if [ "$TESTNAME" = "chassistemp" ];
<br>then<br>        # Analyze the message we got<br>        TEMP=`grep "^Temperature:" $FNAME | awk '{print $2}'`<br>        AGENT1=`grep "^agent1:" $FNAME | awk '{print $2}'`<br>        AGENT2=`grep "^agent2:" $FNAME | awk '{print $2}'`
<br><br>        # The RRD dataset definitions<br>        echo "DS:temperature:GAUGE:600:0:50"<br><br>        # The filename<br>        echo "chassistemp.rrd"<br><br>        # The data<br>        echo "$TEMP"
<br><br><br>        echo "DS:agent1:GAUGE:600:0:75"<br>        echo "chassistemp-agent1.rrd"<br>        echo "$AGENT1"<br><br>        echo "DS:agent2:GAUGE:600:0:75"<br>        echo "
chassistemp-agent2.rrd"<br>        echo "$AGENT2"<br><br>fi<br>if [ "$TESTNAME" = "fans" ];<br>then<br>        # Analyze the message we got<br>        FAN1=`grep "^cpu1:" $FNAME | awk '{print $2}'`
<br>        FAN2=`grep "^cpu2:" $FNAME | awk '{print $2}'`<br><br>        echo "DS:cpufan1:GAUGE:600:712:U"<br>        echo "cpufan1.rrd"<br>        echo "$FAN1"<br><br>        echo "DS:cpufan2:GAUGE:600:712:U"
<br>        echo "cpufan2.rrd"<br>        echo "$FAN2"<br><br>fi<br><br>exit 0<br><br><br>hobbitserver.cfg<br><br>TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,
<br>iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,<br>hobbitd,files,procs=processes,ports,clock,lines,fans"<br><br># This defines which RRD files to include on the "trends" column webpage,
<br># and the order in which they appear.<br>GRAPHS="la,disk,inode,qtree,files,processes,memory,users,vmstat,iostat,tcp.http,tcp,ncv,netstat,ifstat,mrtg::1,ports,<br>temperature,ntpstat,apache,bind,sendmail,mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,lines,chassistemp,
<br>fans"<br><br>hobbitlaunch.cfg<br><br>[rrdstatus]<br>        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg<br>        NEEDS hobbitd<br>        CMD hobbitd_channel --channel=status<br>--log=$BBSERVERLOGS/rrd-
status.log hobbitd_rrd --rrddir=$BBVAR/rrd<br>--extra-script=/etc/hobbit/client.script.sh --extra-tests=chassistemp,fans<br><br># "rrddata" updates RRD files with information that arrives as "data"<br>
messages.<br># If you want RRD graphs of your monitoring BB data, then you want to<br>run this.<br><br>[rrddata]<br>        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg<br>        NEEDS hobbitd<br>        CMD hobbitd_channel --channel=data
<br>--log=$BBSERVERLOGS/rrd-data.log hobbitd_rrd --rrddir=$BBVAR/rrd<br>--extra-script=/etc/hobbit/client.script.sh --extra-tests=chassistemp,fans<br><br>client side script bb-fans.sh<br><br>#!/bin/sh<br><br>BB=/home/hobbit/client/bin/bb
<br>BBDISP="<a href="http://10.5.0.75">10.5.0.75</a>"<br><br># Column name<br>TEST=fans<br><br># Line name<br>HOST=ftp2<br><br>COLOR=green<br>MESSAGE="$FAN1<br>$FAN2"<br><br>FAN1=$(/usr/sbin/sdt | grep "CPU1 Fan" | awk '{print $5}')
<br>FAN2=$(/usr/sbin/sdt | grep "CPU2 Fan" | awk '{print $5}')<br><br># Prepare to send message<br>LINE="status $HOST.$TEST $COLOR `date` $MESSAGE"<br>DATA="data $HOST.$TEST<br>cpu1: $FAN1
<br>cpu2: $FAN2"<br><br># Send message<br># Comment the following line to test<br>#$BB $BBDISP "$LINE"<br>$BB $BBDISP "$DATA"<br><br><br>Like I said, if I change the above client-side script to send via status
<br>channel, I get the graph.  If I leave it on the data channel, I get<br>nothing - not even a link to an empty page.<br><br>If anyone could shed some light on this I'd appreciate it greatly,<br><br>Matt<br><br><br>To unsubscribe from the hobbit list, send an e-mail to
<br><a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a><br><br><br></blockquote></div><br>