From: Craig B. <cra...@ro...> - 2007-08-05 22:41:40
|
=20Hi, Could someone explain step 2, If I append rrd() to the TABLE option in the message file then the following error is logged by devmon. In looking at the man pages there is no rrd options mentioned. Bad rrd option '1' at /usr/local/devmon-0.3.0-beta2/templates/cisco-3750/if_load/message line 5 2) Then make sure, than the file devmon/templates/modele/if_load/message TABLE:rrd() This will show data in a htmltable and add rrd information in the status page. Thanks Craig -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of xbgmsharp Sent: Friday, 13 July 2007 10:10 p.m. To: dev...@li... Subject: [Devmon] How to if_* graph from Devmon to Hobbit Hello, This mail describe how to graph all if_* data from Devmon to Hobbit. I am currently running hobbit 4.2.0/all-in-one patch and devmon 0.3-beta2 1) First you need a curently working hobbit and devmon. 2) Then make sure, than the file devmon/templates/modele/if_load/message TABLE:rrd() This will show data in a htmltable and add rrd information in the status page. In order to check, you should see RRD data information in the status page of the service corresponding to your devmon modele when showing source html. 3) Now make parse the data to create a rrd file (one par interfaces), this is done via extra-rrd.pl. In etc/hobbitlaunch.cfg [rrdstatus] =20 ENVFILE /data/hobbit/server/etc/hobbitserver.cfg =20 NEEDS hobbitd =20 CMD hobbitd_channel --channel=3Dstatus \ =20 --log=3D$BBSERVERLOGS/rrd-status.log hobbitd_rrd \ =20 --rrddir=3D$BBVAR/rrd \ =20 --extra-script=3D$BBHOME/ext/extra-rrd.pl \ =20 --extra-tests=3Dif_load In ext/extra-rrd.pl if ( $TESTNAME eq "if_load" ) { =20 # Analyze the message we got =20 foreach $line (@input) { =20 if ($line =3D~ /(^[A-Z].*) (\d+):(\d+)$/ ) { =20 # The RRD dataset definitions =20 print "DS:in:DERIVE:600:0:U\n"; =20 print "DS:out:DERIVE:600:0:U\n"; =20 # The filename =20 print "if_load_$1.rrd\n"; =20 # The data =20 print "$2:$3\n"; =20 } =20 } } 4) Modify etc/hobbitgraph.cfg [if_load] =20 FNPATTERN if_load(.*).rrd =20 TITLE Network Traffic =20 YAXIS Bits/second =20 DEF:in@RRDIDX@=3D@RRDFN@:in:AVERAGE =20 CDEF:inbytes@RRDIDX@=3Din@RRDIDX@,8,* =20 DEF:out@RRDIDX@=3D@RRDFN@:out:AVERAGE =20 CDEF:outbytes@RRDIDX@=3Dout@RRDIDX@,8,* =20 LINE1:inbytes@RRDIDX@#@COLOR@:@RRDPARAM@ In =20 GPRINT:inbytes@RRDIDX@:LAST: %8.2lf %s (cur) =20 GPRINT:inbytes@RRDIDX@:MAX: %8.2lf %s (max) =20 GPRINT:inbytes@RRDIDX@:MIN: %8.2lf %s (min) =20 GPRINT:inbytes@RRDIDX@:AVERAGE: %8.2lf %s (avg)\n =20 LINE1:outbytes@RRDIDX@#@COLOR@:@RRDPARAM@ Out =20 GPRINT:outbytes@RRDIDX@:LAST: %8.2lf %s (cur) =20 GPRINT:outbytes@RRDIDX@:MAX: %8.2lf %s (max) =20 GPRINT:outbytes@RRDIDX@:MIN: %8.2lf %s (avg) =20 GPRINT:outbytes@RRDIDX@:AVERAGE: %8.2lf %s (avg)\n 4) In etc/hobbitserver.cfg Modify the following. See help/howtograph.html TEST2RRD=3D"cpu=3Dla,disk,...,if_load" GRAPHS=3D"la,disk,if_load::1" The ::1 set the maxcount in order to make one graph form each rrd file create. 5) In etc/hobbitcgi.cfg Modify the following. See hobbitsvc.cgi man CGI_SVC_OPTS=3D"--env=3D/data/hobbit/server/etc/hobbitserver.cfg --no-svcid --history=3Dtop --multi-grahs=3Dif_load,if_err..." 6) The hardest part. The hobbit parsing doesn't remove html table table so you will see many graph link. In order to fix than, you need to modify the hobbit source: lib/htmllog.c patch -p0 < htmllog.path Here is the path, this only set a new counter for all if_* services. This is allready working for the trends colunms because, it is checking all rrd file in the directory. Henrik, do you have any tips to get the nice counter without editing the source code of htmllog.c file ? That's all folks. -- Thanks for using xbgm# http://xbgm.sourceforge.net/ Please feedback. #########################################################################= ############ Disclaimer: The information in this electronic mail message is confidential and may b= e legally privileged. It is intended solely for the Addressee.Access to this internet electroni= c mail message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribut= ion or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you have received this message in error please notify us immediately. Rodney District Council accepts no responsibility for any effects this em= ail message or attachments has on the recipient=20 network or computer system. #########################################################################= ############ |