[hobbit] Sending Data from external script to an RRD - can't see graphs - only links

Johann Eggers Johann.Eggers at teleatlas.com
Mon Sep 24 10:38:03 CEST 2007


 

 

________________________________

From: Javier Temponi [mailto:javier.temponi at selectv.com] 
Sent: Montag, 24. September 2007 08:14
To: hobbit at hswn.dk
Subject: [hobbit] Sending Data from external script to an RRD - can't
see graphs - only links

 

Hello, I want to graph the load information of my routers interfaces, I
have been reading for several days the list, and I have learned a lot
but not enough yet to make this works :-)...

 

This is the situation: I receive the information from devmon, and
execute an external script to write the rrd file. The files are written
but I can not see them from the hobbit page.

I have the rrd files generated and updated but in the hobbit page I only
can see the links and no graph (not an empty or blank graph, only the
little box with the name of the link inside).

 

I'm using devmon 0.3.0-beta2 and hobbit 4.2 with the patch all in one
installed.

OS: Linux kernel 2.6.9

 

Other graphs work fine, the default ones, for example the Conn graph.

The information from devmon is received ok by hobbit, because I have a
table with the load of the interfaces that devmon sent.

 

These are the configuration files:

 

hobbitserver.cfg (to see the graphs in the load and trends columns):

 

TEST2RRD=".....,if_load=ncv"

NCV_if_load="in:GAUGE,out:GAUGE"

 

GRAPHS="......,if_load"

 

hobbitlaunch.cfg 

 

[rrdstatus]

        ENVFILE /usr/local/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 --debug --extra-tests=if_load

 

This is the script  ext/extra-rrd.pl

 

#!/usr/bin/perl

 

# Input parameters: Hostname, testname (column), and messagefile

#$HOSTNAME=$ARGV[0]; ;

$TESTNAME=$ARGV[1]; ;

$FNAME=$ARGV[2]; ;

$filename="/tmp/if_log";

 

# Read the entire files

open (FILEHANDLE,$FNAME) || die (print "cant read file\n");

@input = <FILEHANDLE>;

close (FILEHANDLE);

 

if ( $TESTNAME eq "if_load" ) {

 

        # Analyze the message we got

        foreach $line (@input) {

                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 "if_load_$1.rrd\n";

 

                        # The data

                        print "$2:$3\n";

                }

        }

}

 

 

hobbitgraph.cfg file :

 

[if_load]

        FNPATTERN if_load(.*).rrd

        TITLE Network Traffic

        YAXIS Bits/second

        DEF:in (at) RRDIDX@= (at) RRDFN@:in:AVERAGE

        CDEF:inbytes (at) RRDIDX@=in (at) RRDIDX@,8,*

        DEF:out (at) RRDIDX@= (at) RRDFN@:out:AVERAGE

        CDEF:outbytes (at) RRDIDX@=out (at) RRDIDX@,8,*

        LINE1:inbytes (at) RRDIDX@# (at) COLOR@:@RRDPARAM@ In

        GPRINT:inbytes (at) RRDIDX@:LAST: %8.2lf %s (cur)

        GPRINT:inbytes (at) RRDIDX@:MAX: %8.2lf %s (max)

        GPRINT:inbytes (at) RRDIDX@:MIN: %8.2lf %s (min)

        GPRINT:inbytes (at) RRDIDX@:AVERAGE: %8.2lf %s (avg)\n

        LINE1:outbytes (at) RRDIDX@# (at) COLOR@:@RRDPARAM@ Out

        GPRINT:outbytes (at) RRDIDX@:LAST: %8.2lf %s (cur)

        GPRINT:outbytes (at) RRDIDX@:MAX: %8.2lf %s (max)

        GPRINT:outbytes (at) RRDIDX@:MIN: %8.2lf %s (avg)

        GPRINT:outbytes (at) RRDIDX@:AVERAGE: %8.2lf %s (avg)\n

 

 

If anyone has any idea, where the problem could be or any work around
I'll really appreciat

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20070924/a19df019/attachment.html>


More information about the Xymon mailing list