Syed Jahanzaib Personal Blog to Share Knowledge !

April 1, 2015

Howto display combined values of two interfaces in single MRTG graph

Filed under: Linux Related, Mikrotik Related — Tags: , — Syed Jahanzaib / Pinochio~:) @ 9:16 AM





If you want to view combined value for two or more interfaces in single mrtg graph, here is the simple way to go…
[thanks to MRTG which supports simple math formulas as well 🙂  ]


On your router you have two wan interfaces (You’re not limited to just two) with the names of WAN1 and WAN2 (in load balancing mode or whatever) and you want to display single graph which should displays combined value for both interfaces so that you can have an idea how much WAN bandwidth is consuming (good to make average historical based graphs) , use following cfg


# combinedwan.cfg
Target[]: #WAN1:publicsnmp@ + #WAN2:publicsnmp@
MaxBytes[]: 12500000
Title[]: Traffic Analysis for BOTH DSL WAN Links WAN1+WAN2 -- MikroTik
PageTop[]: <h1>Traffic Analysis for BOTH DSL WAN Links WAN1+WAN2  -- MikroTik</h1>
<div id="sysdetails">
<td>MikroTik Routerboard with Load Balacning</td>
<td>WAN1 + WAN2 Combined</td>
<td>ethernetCsmacd (6)</td>
<td>Max Speed:</td>
<td>100 Mbits/s</td>
<td>Ip: DYNAMIC</td>
<td>No Ip (No DNS name)</td>



Note: Change the Interfaces names, SNMP string and IP according to your network setup. You can get interface numbers/names from the individual mrtg.cfg / router.cfg entries. cfgmaker can help you in this regard example

cfgmaker snmp@ > router.cfg


Happy Graphing 🙂


Syed Jahanzaib


%d bloggers like this: