I have my graphing up and running for my switches but it's not currently
working on my pix's. Here is what my extra-rrd.pl file looks like:
#!/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" ) {
# 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";
}
}
}
I've checked out the devmon svn and saw an extra-rrd.pl that look different
from mine:
# 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" ) {
# Analyze the message we got
foreach $line (@input) {
if ($line =~ /^(\w+) (\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";
}
}
}
My "if ($line" statement and the one in the svn are different but I did mine
the way I did was so that it would graph all the if_load interfaces on my
switches. Can anyone assist me with this?
Thanks,
Josh
|