SNMP/mrtg/traffic reporting incorrect on interfaces

674 views Asked by At

I've installed MRTG, added some options and customizing of mrtg.cfg. Interface speed is 1 Gb/s. I wanted to show the graph and data in bits, not bytes. I ended up with graphs as example show 8Mb/s rather than 80 Mb/s. Where is the mistake in my mrtg.cfg?

Target[10.0.1.1_7]: 7:[email protected]:
YLegend[10.0.1.1_7]: Bits per Second
Colours[10.0.1.1_7]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
Background[10.0.1.1_7]: #a0a0a0a
Kilo[10.0.1.1_7]: 1024
SetEnv[10.0.1.1_7]: MRTG_INT_IP="a.b.c.d" MRTG_INT_DESCR="eth1"
MaxBytes[10.0.1.1_7]: 125000000
Title[10.0.1.1_7]: WAN -- Oslo
PageTop[10.0.1.1_7]: <h1>WAN -- OSL</h1>
  <div id="sysdetails">
   <table>
    <tr>
     <td>System:</td>
     <td>Cisco RV320 OSL </td>
    </tr>
    <tr>
     <td>Maintainer:</td>
     <td></td>
    </tr>
    <tr>
     <td>Description:</td>
     <td>eth1  </td>
    </tr>
    <tr>
     <td>ifType:</td>
     <td>ethernetCsmacd (6)</td>
    </tr>
    <tr>
     <td>ifName:</td>
     <td>eth1</td>
    </tr>
    <tr>
     <td>Max Speed:</td>
     <td>1000 Mbit/s</td>
    </tr>
    <tr>
     <td>Ip:</td>
     <td>a.b.c.d (No DNS name)</td>
    </tr>
   </table>
  </div>

I also added following options:

options[_]: growright,bits,transparent,nobanner,nolegend

1

There are 1 answers

0
Stigh Aarstein On

The answer was actually in the way mrtg.cfg was read and my understanding. MRTG by default during CFGMAKER creates new line of options and create the RunAsDaemon at the bottom of the mrtg.cfg.

Then I came upon this text: The later setting replaces the previous one for the rest of the configuration file

This means it run as default through the config file, and then changes when reading my values at the end.

Solution: All global settings need to be above SNMP/interface/etc settings to be valid.