From: Trent M. <tre...@si...> - 2007-08-03 19:27:36
|
Thanks, I needed that piece, I now have 1 graph with all the points on it. It looks as if the if_load::1 entry in the GRAPHS section of hobbitserver.cfg isnt working to create 1 graph per rrd. Thanks Trent On Fri, 2007-08-03 at 19:10 +0200, xbgmsharp wrote: > In hobbit > > etc/hobbitlaunch.cfg > > # "rrdstatus" updates RRD files with information that arrives as > "status" messages. > # If you want RRD graphs of your monitoring data, then you want to run this. > > [rrdstatus] > ENVFILE /data/hobbit/server/etc/hobbitserver.cfg > NEEDS hobbitd > CMD hobbitd_channel --channel=status \ > --log=$BBSERVERLOGS/rrd-status.log hobbitd_rrd \ > --rrddir=$BBVAR/rrd \ > --extra-script=$BBHOME/ext/extra-rrd.pl \ > --extra-tests=if_load,if_err,if_col > > This defines the script which is use to generated rrd file. > > extra-rrd.pl is a script of mine and it generated rrd data in a file. > > And here is the body: > > #!/usr/bin/perl > > # Input parameters: Hostname, testname (column), and messagefile > #$HOSTNAME=$ARGV[0]; ; > $TESTNAME=$ARGV[1]; ; > $FNAME=$ARGV[2]; ; > > # Read the entire files > open (FILEHANDLE,$FNAME) || die ("cant read file\n"); > @input = <FILEHANDLE>; > close (FILEHANDLE); > > if ( $TESTNAME eq "if_load" || $TESTNAME eq "if_err" || $TESTNAME eq > "if_col") { > > # Analyze the message we got > foreach $line (@input) { > # Debug > system qq# echo "$line" >> /tmp/if_log # > if ($line =~ /(^[A-Z].*) (\d+):(\d+)$/ ) { > > # The RRD dataset definitions > print "DS:in:DERIVE:600:0:U\n"; > print "DS:out:DERIVE:600:0:U\n"; > > # The filename > print "$TESTNAME_$1.rrd\n"; > > # The data > print "$2:$3\n"; > } > } > > } > > exit 0 > > > Hope this help. > > |