[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [hobbit] How to graph RRD data from DEVMON



Here is the extra-rrd.pl script, give Thanks to KaYa
(xbgmsharp (at) gmail.com) for sending this to me originally.  I put just the
if_load test in the script however you can add more for other graphs,  I
have about 15 other stats that I graph this way now. Mostly for our
oracle databases.

------------cut------------------
#!/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 ("cant read file\n");
@input = <FILEHANDLE>;
close (FILEHANDLE);

if ( $TESTNAME eq "if_load") {

           # Analyze the message we got
           open(OUT, ">", $filename);
           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";
                   }
           }
        close (OUT);
}
------------cut------------------

HTH

Trent


On Tue, 2007-09-11 at 15:12 +0200, Klomp, H. wrote:
> Thanks for your answer, but I know that there are some scripts what I
> can use to monitor network interfaces of routers and switches.
> I would like to use devmon instead, because with devmon I don't have
> to know which interfaces I must monitor, devmon will do if for me. 
> But How to get this information into a rrd graph ? 
>  
> There is a document from xbgmsharp on the mailing list
> (http://permalink.gmane.org/gmane.comp.monitoring.hobbit/10245) which
> describes how to if_* grpah from devmon to hobbit. In this document he
> mentions the extra-rrd.pl file. But I can't get it working. 
>  
> Is there anyone who knows of this file, of knows how to get it
> working ? 
>  
> regards, 
>  
> Bert
> 
>         
>         ______________________________________________________________
>         From: Galen Johnson [mailto:Galen.Johnson (at) sas.com] 
>         Sent: dinsdag 11 september 2007 14:41
>         To: hobbit (at) hswn.dk
>         Subject: RE: [hobbit] How to graph RRD data from DEVMON
>         
>         
>         
>         Not sure what the extra-rrd.pl script is but on The Shire,
>         Eric Meddaugh has a couple of monitors (zonestat, for
>         instance) that includes a perl script that probably can be
>         used either as is or at least as a baseline.
>         
>          
>         
>         =G=
>         
>          
>         
>         From: Klomp, H. [mailto:klomph (at) nlr.nl] 
>         Sent: Tuesday, September 11, 2007 5:38 AM
>         To: hobbit (at) hswn.dk
>         Subject: [hobbit] How to graph RRD data from DEVMON
>         
>         
>          
>         
>         I would like to create graphs from the devmon output of cisco
>         switches. For this, I found a document "How to if_* grpah from
>         Devmon to Hobbit". 
>         
>         However I can't find the extra-rrd.pl program 
>         
>         Is there anyone outthere who is able to tell me how to use the
>         data from devmon to create a rrd graph ? 
>         
>         Regards, 
>         
>         Bert Klomp 
>         NLR 
>         
>