Page 3 of 5

Re: SNMP charts show MBits not Mbps

Posted: Thu Mar 10, 2016 1:30 pm
by rbuckle
Ok so i followed everything that you posted to the 'T', I made the changes, deleted the rrd's and xml's etc... but i still get this:

Image

Router says this:
Image

I have no idea what to do and i bet that you are also baffled.

Re: SNMP charts show MBits not Mbps

Posted: Thu Mar 10, 2016 2:31 pm
by ssax
The plugin actually reports an average over the last 10 minutes from when the check runs and MRTG only polls it every 5 minutes, those screenshots will never match.

What timeframe is the routers based on? Also, is it using MAX or AVERAGE?


Thank you

Re: SNMP charts show MBits not Mbps

Posted: Thu Mar 10, 2016 2:44 pm
by rbuckle
The router number in the picture is a RIGHT NOW number, it is not averaged but it also doesnt drop much.

I went and checked your steps, unfort now mrtg is not generating a config file for the host so i am not getting any .rrd's

================Update=====================

So i rebuilt the device and recreated the cfg file now rrd's are being generate... the current value tough ATM is 0Mbps x 0Mbps

Lets see if that changes after a few minutes

Re: SNMP charts show MBytes not Mbits

Posted: Thu Mar 10, 2016 4:26 pm
by ssax
If you recreated the config file did you uncomment Options[_]: growright, bits?

Re: SNMP charts show MBytes not Mbits

Posted: Thu Mar 10, 2016 4:30 pm
by rbuckle
Yes i did, currently reporting: OK - Current BW in: 73.72Mbps Out: 69.17Mbps

Maybe it is just not possible to get the info in a format that i would like

Re: SNMP charts show MBytes not Mbits

Posted: Thu Mar 10, 2016 5:10 pm
by ssax
If you're looking for a just a point in time value then you'd likely just need to use a standard SNMP poll to get the data and not use the MRTG method.

Code: Select all

snmpwalk -v2c -c community X.X.X.X mib-2.interfaces
You could also try using the SNMP Walk Wizard and it should default to just the interface information.

Once we figure out exactly what format it's outputted in we can convert it with a new plugin so it should show you what you want.

Re: SNMP charts show MBytes not Mbits

Posted: Thu Mar 10, 2016 5:31 pm
by rbuckle
Nice thing about mikrotik's is that you can do this:
[rbuckle@BR2-Hurricane] /interface> print oid
Flags: D - dynamic, X - disabled, R - running, S - slave
0 R ;;; to Core Switch
name=.1.3.6.1.2.1.2.2.1.2.3 mtu=.1.3.6.1.2.1.2.2.1.4.3 mac-address=.1.3.6.1.2.1.2.2.1.6.3 admin-status=.1.3.6.1.2.1.2.2.1.7.3 oper-status=.1.3.6.1.2.1.2.2.1.8.3 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.3 packets-in=.1.3.6.1.2.1.31.1.1.1.7.3
discards-in=.1.3.6.1.2.1.2.2.1.13.3 errors-in=.1.3.6.1.2.1.2.2.1.14.3 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.3 packets-out=.1.3.6.1.2.1.31.1.1.1.11.3 discards-out=.1.3.6.1.2.1.2.2.1.19.3 errors-out=.1.3.6.1.2.1.2.2.1.20.3

1 name=.1.3.6.1.2.1.2.2.1.2.4 mtu=.1.3.6.1.2.1.2.2.1.4.4 mac-address=.1.3.6.1.2.1.2.2.1.6.4 admin-status=.1.3.6.1.2.1.2.2.1.7.4 oper-status=.1.3.6.1.2.1.2.2.1.8.4 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.4 packets-in=.1.3.6.1.2.1.31.1.1.1.7.4
discards-in=.1.3.6.1.2.1.2.2.1.13.4 errors-in=.1.3.6.1.2.1.2.2.1.14.4 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.4 packets-out=.1.3.6.1.2.1.31.1.1.1.11.4 discards-out=.1.3.6.1.2.1.2.2.1.19.4 errors-out=.1.3.6.1.2.1.2.2.1.20.4

2 R ;;; to XO Router
name=.1.3.6.1.2.1.2.2.1.2.5 mtu=.1.3.6.1.2.1.2.2.1.4.5 mac-address=.1.3.6.1.2.1.2.2.1.6.5 admin-status=.1.3.6.1.2.1.2.2.1.7.5 oper-status=.1.3.6.1.2.1.2.2.1.8.5 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.5 packets-in=.1.3.6.1.2.1.31.1.1.1.7.5
discards-in=.1.3.6.1.2.1.2.2.1.13.5 errors-in=.1.3.6.1.2.1.2.2.1.14.5 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.5 packets-out=.1.3.6.1.2.1.31.1.1.1.11.5 discards-out=.1.3.6.1.2.1.2.2.1.19.5 errors-out=.1.3.6.1.2.1.2.2.1.20.5

3 name=.1.3.6.1.2.1.2.2.1.2.6 mtu=.1.3.6.1.2.1.2.2.1.4.6 mac-address=.1.3.6.1.2.1.2.2.1.6.6 admin-status=.1.3.6.1.2.1.2.2.1.7.6 oper-status=.1.3.6.1.2.1.2.2.1.8.6 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.6 packets-in=.1.3.6.1.2.1.31.1.1.1.7.6
discards-in=.1.3.6.1.2.1.2.2.1.13.6 errors-in=.1.3.6.1.2.1.2.2.1.14.6 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.6 packets-out=.1.3.6.1.2.1.31.1.1.1.11.6 discards-out=.1.3.6.1.2.1.2.2.1.19.6 errors-out=.1.3.6.1.2.1.2.2.1.20.6

4 name=.1.3.6.1.2.1.2.2.1.2.7 mtu=.1.3.6.1.2.1.2.2.1.4.7 mac-address=.1.3.6.1.2.1.2.2.1.6.7 admin-status=.1.3.6.1.2.1.2.2.1.7.7 oper-status=.1.3.6.1.2.1.2.2.1.8.7 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.7 packets-in=.1.3.6.1.2.1.31.1.1.1.7.7
discards-in=.1.3.6.1.2.1.2.2.1.13.7 errors-in=.1.3.6.1.2.1.2.2.1.14.7 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.7 packets-out=.1.3.6.1.2.1.31.1.1.1.11.7 discards-out=.1.3.6.1.2.1.2.2.1.19.7 errors-out=.1.3.6.1.2.1.2.2.1.20.7

5 name=.1.3.6.1.2.1.2.2.1.2.8 mtu=.1.3.6.1.2.1.2.2.1.4.8 mac-address=.1.3.6.1.2.1.2.2.1.6.8 admin-status=.1.3.6.1.2.1.2.2.1.7.8 oper-status=.1.3.6.1.2.1.2.2.1.8.8 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.8 packets-in=.1.3.6.1.2.1.31.1.1.1.7.8
discards-in=.1.3.6.1.2.1.2.2.1.13.8 errors-in=.1.3.6.1.2.1.2.2.1.14.8 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.8 packets-out=.1.3.6.1.2.1.31.1.1.1.11.8 discards-out=.1.3.6.1.2.1.2.2.1.19.8 errors-out=.1.3.6.1.2.1.2.2.1.20.8

6 name=.1.3.6.1.2.1.2.2.1.2.9 mtu=.1.3.6.1.2.1.2.2.1.4.9 mac-address=.1.3.6.1.2.1.2.2.1.6.9 admin-status=.1.3.6.1.2.1.2.2.1.7.9 oper-status=.1.3.6.1.2.1.2.2.1.8.9 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.9 packets-in=.1.3.6.1.2.1.31.1.1.1.7.9
discards-in=.1.3.6.1.2.1.2.2.1.13.9 errors-in=.1.3.6.1.2.1.2.2.1.14.9 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.9 packets-out=.1.3.6.1.2.1.31.1.1.1.11.9 discards-out=.1.3.6.1.2.1.2.2.1.19.9 errors-out=.1.3.6.1.2.1.2.2.1.20.9

7 name=.1.3.6.1.2.1.2.2.1.2.10 mtu=.1.3.6.1.2.1.2.2.1.4.10 mac-address=.1.3.6.1.2.1.2.2.1.6.10 admin-status=.1.3.6.1.2.1.2.2.1.7.10 oper-status=.1.3.6.1.2.1.2.2.1.8.10 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.10
packets-in=.1.3.6.1.2.1.31.1.1.1.7.10 discards-in=.1.3.6.1.2.1.2.2.1.13.10 errors-in=.1.3.6.1.2.1.2.2.1.14.10 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.10 packets-out=.1.3.6.1.2.1.31.1.1.1.11.10 discards-out=.1.3.6.1.2.1.2.2.1.19.10
errors-out=.1.3.6.1.2.1.2.2.1.20.10

8 R ;;; to Hurricane custID:dc1265 Zayo lit transport CID: ETYX/088028//ZYO
name=.1.3.6.1.2.1.2.2.1.2.1 mtu=.1.3.6.1.2.1.2.2.1.4.1 mac-address=.1.3.6.1.2.1.2.2.1.6.1 admin-status=.1.3.6.1.2.1.2.2.1.7.1 oper-status=.1.3.6.1.2.1.2.2.1.8.1 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.1 packets-in=.1.3.6.1.2.1.31.1.1.1.7.1
discards-in=.1.3.6.1.2.1.2.2.1.13.1 errors-in=.1.3.6.1.2.1.2.2.1.14.1 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.1 packets-out=.1.3.6.1.2.1.31.1.1.1.11.1 discards-out=.1.3.6.1.2.1.2.2.1.19.1 errors-out=.1.3.6.1.2.1.2.2.1.20.1

9 name=.1.3.6.1.2.1.2.2.1.2.2 mtu=.1.3.6.1.2.1.2.2.1.4.2 mac-address=.1.3.6.1.2.1.2.2.1.6.2 admin-status=.1.3.6.1.2.1.2.2.1.7.2 oper-status=.1.3.6.1.2.1.2.2.1.8.2 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.2 packets-in=.1.3.6.1.2.1.31.1.1.1.7.2
discards-in=.1.3.6.1.2.1.2.2.1.13.2 errors-in=.1.3.6.1.2.1.2.2.1.14.2 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.2 packets-out=.1.3.6.1.2.1.31.1.1.1.11.2 discards-out=.1.3.6.1.2.1.2.2.1.19.2 errors-out=.1.3.6.1.2.1.2.2.1.20.2

10 R name=.1.3.6.1.2.1.2.2.1.2.11 mtu=.1.3.6.1.2.1.2.2.1.4.11 mac-address=.1.3.6.1.2.1.2.2.1.6.11 admin-status=.1.3.6.1.2.1.2.2.1.7.11 oper-status=.1.3.6.1.2.1.2.2.1.8.11 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.11
packets-in=.1.3.6.1.2.1.31.1.1.1.7.11 discards-in=.1.3.6.1.2.1.2.2.1.13.11 errors-in=.1.3.6.1.2.1.2.2.1.14.11 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.11 packets-out=.1.3.6.1.2.1.31.1.1.1.11.11 discards-out=.1.3.6.1.2.1.2.2.1.19.11
errors-out=.1.3.6.1.2.1.2.2.1.20.11

11 X name=.1.3.6.1.2.1.2.2.1.2.12 mtu=.1.3.6.1.2.1.2.2.1.4.12 mac-address=.1.3.6.1.2.1.2.2.1.6.12 admin-status=.1.3.6.1.2.1.2.2.1.7.12 oper-status=.1.3.6.1.2.1.2.2.1.8.12 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.12
packets-in=.1.3.6.1.2.1.31.1.1.1.7.12 discards-in=.1.3.6.1.2.1.2.2.1.13.12 errors-in=.1.3.6.1.2.1.2.2.1.14.12 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.12 packets-out=.1.3.6.1.2.1.31.1.1.1.11.12 discards-out=.1.3.6.1.2.1.2.2.1.19.12
errors-out=.1.3.6.1.2.1.2.2.1.20.12

12 X name=.1.3.6.1.2.1.2.2.1.2.13 mtu=.1.3.6.1.2.1.2.2.1.4.13 mac-address=.1.3.6.1.2.1.2.2.1.6.13 admin-status=.1.3.6.1.2.1.2.2.1.7.13 oper-status=.1.3.6.1.2.1.2.2.1.8.13 bytes-in=.1.3.6.1.2.1.31.1.1.1.6.13
packets-in=.1.3.6.1.2.1.31.1.1.1.7.13 discards-in=.1.3.6.1.2.1.2.2.1.13.13 errors-in=.1.3.6.1.2.1.2.2.1.14.13 bytes-out=.1.3.6.1.2.1.31.1.1.1.10.13 packets-out=.1.3.6.1.2.1.31.1.1.1.11.13 discards-out=.1.3.6.1.2.1.2.2.1.19.13
errors-out=.1.3.6.1.2.1.2.2.1.20.13
[rbuckle@BR2-Hurricane] /interface>
This shows that the mikrotik is reporting in BYTES

Re: SNMP charts show MBytes not Mbits

Posted: Fri Mar 11, 2016 3:19 pm
by ssax
I'm still looking for the best way to do this, we will have to make a custom script or use one of the plugins on the exchange but it shouldn't be too difficult.

If you don't hear from me by the end of Monday, please reply to this post so that it pops up on my dashboard.

Re: SNMP charts show MBytes not Mbits

Posted: Fri Mar 11, 2016 4:27 pm
by rbuckle
great and thanks... BTW those OID's are not the same on every Mikrotik (just wanted to make sure you were aware)

Re: SNMP charts show MBytes not Mbits

Posted: Mon Mar 14, 2016 10:14 am
by ssax
Since we don't know what the OIDs will be it causes some issues, especially considering you would need to manage it manually and it would take a long time.

After thinking about this, the standard MRTG values that are queried and stored are in Bytes so we should be able to use MRTGs RRD files from the original configuration (stored in Bytes not Bits), then we can use the modified plugin to only query 5 minutes back (which should only include the last result) and then output the data in bits.

So try commenting out the Options[_]: growright, bits again and delete the /var/lib/mrtg/DEVICENAME_PORT.rrd files.

Then replace the plugin with this modified one and delete your /usr/local/nagios/share/perfdata/DEVICENAME.rrd and xml files.
check_rrdtraf_custom.zip
Let me know the results.