[mrtg] Collecting data from rrd & using rrdgraph?
Arvon Griffiths
Arvon.Griffiths at txdot.gov
Fri Nov 12 21:28:52 CET 2010
Okay, now it's starting to make a little sense...
Soooo, let's say that rrdtool and rrdcgi is in /usr/bin/
...and my cgi dir is at /srv/www/cgi-bin
...and I just want to graph traffic.
Guessing here-
Q1: Is this correct: Create a CGI script and put it into the /srv/www/cgi-bin that says something like:
#!/usr/bin/rrdcgi
<HTML> <HEAD><TITLE>RRDCGI Demo</TITLE></HEAD> <BODY> <H1>RRDCGI test Page</H1> <RRD::GRAPH /.../web/gifs/XXXXX.gif --imginfo '<IMG SRC=/.../gifs/%s WIDTH=%lu HEIGHT=%lu >' --lazy --start -1d --end now DEF:http_src=/PATH/TO/RRDS/?????.rrd:http_src:AVERAGE AREA:http_src#00ff00:http_src > </BODY> </HTML>
Q2: If I use-
cfgmaker --global 'Options[_]: unknaszero,bits' --global 'LogFormat: rrdtool' -output ~/router1.cfg public at router1
...to create the CFG files, what is corrrect for ?????.rrd?
Q3: /PATH/TO/RRDS is where normally?
Q4: Without having to make a cgi script for every router and time period, how do you use variables with the script (using bash or Perl)?
(e.g. '/.../web/gifs/$image.gif', 'DEF:http_src=/PATH/TO/RRDS/$router.rrd:http_src:AVERAGE', and '--lazy --start -$period --end now' )
>>> "Kevin P. Foote" <kpfoote at iup.edu> 11/12/2010 1:17 PM >>>
those CGIs (14all, rrdcgi, routers2) use 'rrd graph' to create the
images they display ..
so yes 'rrd graph' will do what you want .. the apps mentioned above
deal with how you present the data / graphs generated to the browser..
if your coming from a stock mrtg install using the traditional log
format then 14all rrdcgi will mimic your mrtg look.
Im not advocating 1 vs the other of the normal 3 that are used.. they
all do pretty much the same .. which is display your data thats stored
in the .rrd file :-)
(im biased to drraw anyway)
------
thanks
kevin.foote
On Fri, 12 Nov 2010, Arvon Griffiths wrote:
-> It LOOKS like rrd graph with do what I want without me having to install 14all, rrdcgi, routers2 or something else onto my machine.
->
-> Am I confused?
->
->
->
->
-> > 14all and RRDcgi are meant to look pretty much just like mrtg did/does..
->
->
->
-> -> We are currently using MRTG to monitor cicso router traffic...
-> ->
-> -> 1) I need to generate a list based on highest traffic or errors, can anyone give me an (simple) example script of how to pull data from rrd using Perl or Bash?
-> ->
-> -> 2) I need to generate just the graphs and make them look like the old, native MRTG graphs. It looks like RRD Graph will do the trick can anyone give me an example command to do this?
-> -> I know that using something like routers2 or 14all is probably easier but, I need to keep the same site look and feel so, I just want graphs.
->
-> ------------------------------------------------------
->
-> Early Forum Registration Closing Soon!
->
-> Register now for the 2011 Texas Transportation Forum before the
-> early registration discount expires on Wednesday, November 17th!
->
-> http://www.txdot.gov/ttf/default.htm
->
-> ------------------------------------------------------
->
------------------------------------------------------
Early Forum Registration Closing Soon!
Register now for the 2011 Texas Transportation Forum before the
early registration discount expires on Wednesday, November 17th!
http://www.txdot.gov/ttf/default.htm
------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20101112/90d464e7/attachment.htm
More information about the mrtg
mailing list