SNMP charts show MBytes not Mbits

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: SNMP charts show MBits not Mbps

Post by rbuckle »

I am so sorry for such a Noob at this but where do i import this script, i tried in the plugins but then it does not show up in the core check command options
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP charts show MBits not Mbps

Post by ssax »

Just put it in /usr/local/nagios/libexec, if you want it to be used as the default for the switch wizard then go to Configure > Core Config Manager > Commands, edit the check_xi_service_mrtgtraf and change it to:

Code: Select all

$USER1$/check_rrdtraf_custom -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$
Then apply config.

NOTE: Again, you will mess up your current bandwidth checks if you do this and will need to delete the associated RRDs in /usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: SNMP charts show MBits not Mbps

Post by rbuckle »

OK so i think that i have this problem sussed out,

It seems that when you probe a Mikrotik with SNMP it returns a number in bytes, Nagios doesn't know this and assumes it is bits.

So now it seems i am looking for a plugin to convert the plugin to convert bytes to bits, which means we shouldnt need to delete the rrd's?
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP charts show MBits not Mbps

Post by ssax »

MRTG queries your router/switch which by default gets it thinking it's bytes.

The only way that I can see to resolve the issue would be for you to delete the RRDs (from /var/lib/mrtg and from /usr/local/nagios/share/perfdata) for these Mikrotik devices and add this option to your /etc/mrtg/conf.d/DEVICENAME.cfg

Code: Select all

Options[_]: growright, bits
We would then have to look at the script from there since the calculations would be different I believe, maybe not though.
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: SNMP charts show MBits not Mbps

Post by rbuckle »

ok so that broke mrtg LOL
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: SNMP charts show MBits not Mbps

Post by rkennedy »

Could you provide more information about how it broke MRTG? What are you seeing?
Former Nagios Employee
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: SNMP charts show MBits not Mbps

Post by rbuckle »

i am seeing no data in the nagios reports... all charts show 0Mbps after making that change.

I run a test on the command and it returns 0Mbps
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP charts show MBits not Mbps

Post by ssax »

Just to confirm.

You added it to the /etc/mrtg/conf.d/DEVICENAME.cfg file, right?

You removed the RRD files for the bandwidth checks from /usr/local/nagios/share/perfdata/HOSTNAME/ and from /var/lib/mrtg/, right?
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: SNMP charts show MBits not Mbps

Post by rbuckle »

That is correct
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP charts show MBits not Mbps

Post by ssax »

Ok, follow this process, I've updated the plugin to use the proper logic now.

Edit /etc/mrtg/conf.d/DEVICENAME.cfg and uncomment this line:

Code: Select all

# Options[_]: growright, bits
Then delete all your MRTG RRDs for that device:

Code: Select all

rm -rf /var/lib/mrtg/DEVICENAME*
Then take this updated plugin, unzip it, and put it in /usr/local/nagios/libexec with a different name (like check_rrdtraf_bits).
check_rrdtraf_bits.zip
Then go into the web interface and go to Configure > Core Config Manager > Commands and edit the check_xi_service_mrtgtraf command to point to the new plugin (check_rrdtraf_bits) and apply configuration. Doing it this way will allow the wizard to still work properly and should be safe for upgrades.

Now delete all your bandwidth perfdata files for that device (XML and RRD files) in /usr/local/nagios/share/perfdata/DEVICENAME.

It needs to be done in that exact process. Once MRTG runs again and a few bandwidth checks run it should rebuild the performance data graphs and should show the proper data.
You do not have the required permissions to view the files attached to this post.
Locked