[rrd-users] Re: Regarding Integration with MRTG/RRD

Logg, Connie A. cal at SLAC.Stanford.EDU
Thu Sep 6 18:44:39 MEST 2001


It is relatively simple to supply data to rrdtool.  I have an example here extracted from my netflow data processing perl code.

Of course you have to define the RRD...
# stuff it into rrd tcp, udp, icmp, etc. protocol data file

$protorrd = "$rrddir/$ip/proto-dist.rrd";  # <--- The rrd

# the template gives the order I am going to put the values into the rrd
$template = "--template inicmppkts:intcppkts:inudppkts:ingrepkts:inigmppkts:inipmppkts:inipinippkts:inipv6pkts:inotherpkts:" . 
                        "inicmpbytes:intcpbytes:inudpbytes:ingrebytes:inigmpbytes:inipmpbytes:inipinipbytes:inipv6bytes:inotherbytes:" . 
                        "inicmpflows:intcpflows:inudpflows:ingreflows:inigmpflows:inipmpflows:inipinipflows:inipv6flows:inotherflows:" .
                        "outicmppkts:outtcppkts:outudppkts:outgrepkts:outigmppkts:outipmppkts:outipinippkts:outipv6pkts:outotherpkts:" . 
                        "outicmpbytes:outtcpbytes:outudpbytes:outgrebytes:outigmpbytes:outipmpbytes:outipinipbytes:outipv6bytes:outotherbytes:" .
                        "outicmpflows:outtcpflows:outudpflows:outgreflows:outigmpflows:outipmpflows:outipinipflows:outipv6flows:outotherflows:" .
                        "intotpkts:intotbytes:outtotpkts:outtotbytes:totrecords:totflows:missed";

# This is the "data" with the epoch seconds...                     
$datastream = "$epoch:$inicmppkts:$intcppkts:$inudppkts:$ingrepkts:$inigmppkts:$inipmppkts:$inipinippkts:$inipv6pkts:$inotherpkts:" . 
              "$inicmpbytes:$intcpbytes:$inudpbytes:$ingrebytes:$inigmpbytes:$inipmpbytes:$inipinipbytes:$inipv6bytes:$inotherbytes:" .
              "$inicmpflows:$intcpflows:$inudpflows:$ingreflows:$inigmpflows:$inipmpflows:$inipinipflows:$inipv6flows:$inotherflows:" . 
              "$outicmppkts:$outtcppkts:$outudppkts:$outgrepkts:$outigmppkts:$outipmppkts:$outipinippkts:$outipv6pkts:$outotherpkts:" . 
              "$outicmpbytes:$outtcpbytes:$outudpbytes:$outgrebytes:$outigmpbytes:$outipmpbytes:$outipinipbytes:$outipv6bytes:$outotherbytes:" .
              "$outicmpflows:$outtcpflows:$outudpflows:$outgreflows:$outigmpflows:$outipmpflows:$outipinipflows:$outipv6flows:$outotherflows:" . 
              "$intotalpkts:$intotalbytes:$outtotalpkts:$outtotalbytes:$records:$flows:$missed";

$status = RRDp::cmd qq{update $protorrd $template $datastream};

$ans = RRDp::read;


$err = RRD::end;

#######################

I hope this helps..

Connie Logg - Network Analyst - 650-926-2879
Stanford Linear Accelerator Center
MS 97; 2575 SandHill Road; Menlo Park CA 94025
"Happiness is found along the way, not at the end of the road"

-----Original Message-----
From: Venkatesh Ramachandran [mailto:rvenky at cisco.com]
Sent: Thursday, September 06, 2001 4:33 AM
To: rrd-users at list.ee.ethz.ch; rrd-developers at list.ee.ethz.ch; Venkatesh
Ramachandran
Subject: [rrd-users] Regarding Integration with MRTG/RRD


Hello everyone,
   I work on a Network Management tool called Internetwork Performance
Monitor, one of Cisco's set of Troubleshooting and
Monitoring applications. I was trying to integrate our application with
MRTG.
   I was interested in understanding the following points:

   * From the MRTG website and other web resources, i understand that
     MRTG always need an SNMP agent to get the     information. Is my
     understanding correct?
   * Can an application integrate with MRTG ? For example, can another
     application, that collects data  from the routers/switches etc..,
     supply data from its Database, in a specific format, so that MRTG
     can plot the graphs?
   * Is it possible somehow to supply data to the RRD tool from another
     Database, instead of data being collected from the device itself?
   * The RRD website talks about Frontends being developed for RRD -
     which poll network devices and put a friendly user     interface on
     it.But, i wanted to know, if we can fill the RRD tool, incase MRTG
     cannot accept data from a Database.

  It would be of great help, if you could clear my doubts.

Thanks in advance,
Venkatesh.


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list