Page 1 of 1

Unable to get Bandwidth values on new devices

Posted: Wed Mar 06, 2019 4:10 pm
by Matthew.Cary
I added some new routers and switches to our monitoring setup using the router/switch wizard in XI (v 5.5.9), but I can only get bandwidth information from the Routers. On the routers I get status info *and* bandwidth information. However, my new switches all show bandwidth OK but don't give me any values.
I have quite a few other switches that are reporting correctly, it's just these new ones that are causing a problem. Their config settings are identical, their hardware is identical, and other stuff at the same site is working. I'm using SNMP v3 via the check_xi-service_mrtgtraf check which is working elsewhere.

My check command looks like this:
$ /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/s212dists.n_112.rrd -w 19000.00,19000.00 -c 20000.00,20000.00 -l M
OK - Current BW in: 0Mbps Out: 0Mbps|in=0Mb/s;19000.00;20000.00 out=0Mb/s;19000.00;20000.00

What am I missing?

Re: Unable to get Bandwidth values on new devices

Posted: Wed Mar 06, 2019 4:43 pm
by npolovenko
Hello, @Matthew.Cary. It could be that new devices have a very little bandwidth and so check_rrdtraf is rounding it to 0 Megabytes.

Please open the following cron /etc/cron.d/mrtg and change it to:
*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok

Re: Unable to get Bandwidth values on new devices

Posted: Wed Mar 06, 2019 5:21 pm
by Matthew.Cary
To confirm: I should remove the --user=xxxx and --group=xxxx from the end of that line?

Otherwise my file already looks exactly like what you posted

Re: Unable to get Bandwidth values on new devices

Posted: Wed Mar 06, 2019 5:31 pm
by npolovenko
@Matthew.Cary, Yes, please do. And then run:
service crond restart

Re: Unable to get Bandwidth values on new devices

Posted: Wed Mar 06, 2019 6:16 pm
by Matthew.Cary
It took some time, but that appears to have eventually fixed the issue.

Out of curiosity, why was the name and usergroup causing the issue?

Re: Unable to get Bandwidth values on new devices

Posted: Thu Mar 07, 2019 11:22 am
by npolovenko
@Matthew.Cary, We added a security feature in the latest version of XI to run mrtg cron as the nagios user. In the past it used to run as root. However, some users encountered problems where mrtg stopped updating after this change and we're still looking into the cause. In the meantime, deleting nagios user allows the mrtg cron to run as in previous versions.