[mrtg] sum router interface (SNMP)
s.shipway at auckland.ac.nz
Mon Oct 6 22:53:47 CEST 2008
> I'm tracking several router interfaces with mrtg for the traffic. The
> graph shows the in and out data, I would like to additionally see a sum
> of both in and out in the graph.
> Is it possible to get the sum within the mrtg configuration or do I need
> to write a script of my own?
You have two options (well, three, if you count creating your own script):
* In native MRTG, you can define a calculated target - eg,
Target[sum]: 1:comm at router + 2:comm at router
And then get a graph showing the total of multiple targets. This works in all MRTG modes, but you only get a single line on the graph so no breakdown of the components.
* If you are using RRDtool and the routers2 frontend, you can define a userdefined summary graph over the component Targets. This allows you to have all the lines on a single graph, plus a total and/or average line. You can also do clever things like stack the component lines, or put 'incoming' above the x-axis and 'outgoing' below the x-axis, or even do all these things at the same time.
More information about the mrtg