From: Francois L. <lac...@gm...> - 2007-08-02 08:07:28
|
In hobbit etc/hobbitlaunch.cfg # "rrdstatus" updates RRD files with information that arrives as =20 "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=3Dstatus \ --log=3D$BBSERVERLOGS/rrd-status.log hobbitd_rrd \ --rrddir=3D$BBVAR/rrd \ --extra-script=3D$BBHOME/ext/extra-rrd.pl \ --extra-tests=3Dif_load,if_err,if_col This defines the script which is use to generated rrd file. extra-rrd.pl is a script of mine it generated rrd data in a file. And here is the body: #!/usr/bin/perl # Input parameters: Hostname, testname (column), and messagefile #$HOSTNAME=3D$ARGV[0]; ; $TESTNAME=3D$ARGV[1]; ; $FNAME=3D$ARGV[2]; ; # Read the entire files open (FILEHANDLE,$FNAME) || die ("cant read file\n"); @input =3D <FILEHANDLE>; close (FILEHANDLE); if ( $TESTNAME eq "if_load" || $TESTNAME eq "if_err" || $TESTNAME eq =20 "if_col") { # Analyze the message we got foreach $line (@input) { # Debug system qq# echo "$line" >> /tmp/if_log # if ($line =3D~ /(^[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. Trent Melcher <tre...@si...> a =C3=A9crit : > Where do you get the extra-rrd.pl script to add these changes to??? > > Thanks > Trent Melcher > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Devmon-support mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/devmon-support > |