[mrtg] how can i get in/out bandwidth values from mrtg

Steve Shipway s.shipway at auckland.ac.nz
Thu Mar 5 22:15:01 CET 2009


>  1) i want to retrieve in/out bandwidth values and want to store, but from
> where will i get those values?

You would usually retrieve these values directly from the device, using
SNMP.  This would need to be enabled on the device first.  Then, you can use
cfgmaker to generate the required configuration files automatically (if you
installed the Windows MRTG Bundle then just add the device details to the
myrouters.txt file and it will all happen automatically).

You then run MRTG every few minutes (usually by using Daemon mode - see the
MRTG documentation) and it collects and stores the data.

>  2) how can i call mrtg from my own application- what are the conditions.

This is a very open-ended question.  Call it to do what?  MRTG is usually
running on its own collecting the data independently.  Then you can view the
graphs via the web server.  If you run MRTG in 'native mode' it will
regenerate the graphs every cycle and you can access the files directly.  If
you run in 'rrdtool mode' (the recommended way) then you use a web CGI to
generate the menu and graphs (eg, routers2, 14all, mrtg-rrd).  These will
have parameters you can pass to go to a specific graph, if you want to
create links from other web applications or web pages.  For this, see the
documentation of the front-end you have chosen.

Steve

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3133 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20090306/8b21e2f4/attachment.bin 


More information about the mrtg mailing list