[mrtg] add in and out traffic

Steve Shipway s.shipway at auckland.ac.nz
Tue Dec 16 21:53:42 CET 2008


There are two ways to achieve this.

 

The more complex but flexible way is to use the Routers2 frontend and define
a userdefined graph over the single Target, with the 'withtotal' and
'nogroup' options, which will result in a third 'total' line appearing.
You'll also get the total traffic calculations over the time window.

 

The simplest way, though, is to define a new Target which adds the
variables, thus:

 

Target[combined]: ifInOctets.0&ifInOctets:community at device +
ifOutOctets.0&ifOutOctets.0:community at device

Options[combined]: noo bits growright

Legend1[combined]: Total traffic

Legent3[combined]: Peak total traffic

 

Note that, instead of using the .interfacenumber suffix in the Target
definition, you can instead use #interfacename , /interfaceip or any of the
other shorthand methods.

 

This method will result in an additional few SNMP queries but this is
unlikely to be significant unless you are doing this over a large number of
devices.

 

Hope this helps,

 

Steve

 

  _____  

From: mrtg-bounces at lists.oetiker.ch [mailto:mrtg-bounces at lists.oetiker.ch]
On Behalf Of Vadood Etminanbakhsh



This is the first time I am using this list and I do not know if I am
posting my question to the right place. For the last two days I was trying
to generate traffic graphs displaying sum of incoming and outgoing traffic
for my network adapter. I tried to add up ifInOctets and ifOutOctets to but
it had no results. All I want to do is to generate a graph with two
variables being total (in+out) traffic and either in or out traffic.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20081217/442258aa/attachment.html 
-------------- 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/20081217/442258aa/attachment.bin 


More information about the mrtg mailing list