Page 1 of 1

SNMP Bandwidth checks returning 0 bps

Posted: Mon May 22, 2017 5:01 am
by caf_infra
Hello, Nagios Team

We recently started to monitor our network devices with SNMP and everything worked fine. At one moment the bandwidth checks started to return 0 on all hosts and interfaces. There were some test configurations made on the through Nagios XI web interface but then they were deleted. After these configurations were deleted SNMP bandwidth check started to return 0. The actions was been taken is reboot of the system and database restore which didn't worked. I am asking for assistance with the troubleshooting this issue. Please find attached file with some initial system information.

If I will not be able to reply I will forward this call to my colleagues and they will be able to reply.

Kind Regards,

Jurij

Re: SNMP Bandwidth checks returning 0 bps

Posted: Mon May 22, 2017 1:01 pm
by ssax
Please run through this KB article to determine what the problem is:

https://support.nagios.com/kb/article/n ... raphs.html


Thank you

Re: SNMP Bandwidth checks returning 0 bps

Posted: Mon May 22, 2017 1:17 pm
by tgriep
Take a look at the following 2 KB articles for possible fixes for the issue you are having with the Bandwidth checks. One of them may help you out.
https://support.nagios.com/kb/article/n ... x-cfg.html
https://support.nagios.com/kb/article/n ... *-cfg.html

Re: SNMP Bandwidth checks returning 0 bps

Posted: Tue May 23, 2017 4:32 am
by caf_infra
tgriep wrote:Take a look at the following 2 KB articles for possible fixes for the issue you are having with the Bandwidth checks. One of them may help you out.
https://support.nagios.com/kb/article/n ... x-cfg.html
https://support.nagios.com/kb/article/n ... *-cfg.html
I've looked at these articles and checked if they are related to our issue and it seems everything is fine with "include" file.
I cannot observe any of the error messages mentioned in these articles.

Re: SNMP Bandwidth checks returning 0 bps

Posted: Tue May 23, 2017 4:44 am
by caf_infra
ssax wrote:Please run through this KB article to determine what the problem is:

https://support.nagios.com/kb/article/n ... raphs.html


Thank you
Thanks for your response!
I have checked configuration files issued number of troubleshooting commands mentioned in this article. The only problem I have spotted is as follows:

[root@nagxiliv01 ~]# time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
ERROR: Line 528 (Target[192.168.125.254_5365]: 5365:[email protected]:161::::2) in CFG file (/etc/mrtg/conf.d/192.168.125.254.cfg)
contains a duplicate definition for target[192.168.125.254_5365].
First definition is on line 4

real 0m0.253s
user 0m0.231s
sys 0m0.023s

[root@nagxiliv01 ~]# /usr/local/nagios/libexec/check_rrdtraf -f '/var/lib/mrtg/192.168.125.254_5365.rrd' -w 1 -c 2
OK - Current BW in: 0bps Out: 0bps|in=0b/s;1;2 out=0b/s;1;2

To double check if the command is having same output on the different rrd file:

[root@nagxiliv01 ~]# /usr/local/nagios/libexec/check_rrdtraf -f '/var/lib/mrtg/192.168.125.247_500010000.rrd' -w 1 -c 2
OK - Current BW in: 0bps Out: 0bps|in=0b/s;1;2 out=0b/s;1;2

However, checking /etc/mrtg/conf.d/192.168.125.254.cfg file on the presence of duplicate definitions didn't reveal anything.
What could be my next step? Shall I delete this configuration file and recreate it with Router/Switch Wizard?

Many Thanks

Re: SNMP Bandwidth checks returning 0 bps

Posted: Tue May 23, 2017 8:59 am
by tgriep
The duplicate entry could be in another file and it needs to be removed. When the MRTG process find a duplicate, it does not continue on in the process so that is causing the issue.
To find the duplicate, login to the server as root and run the following.

Code: Select all

cd /etc/mrtg/conf.d
grep -R 192.168.125.254_5365 *
This will show you which file the duplicate is in and you will have to edit the file to remove it.
Then run this again to check for more duplicates.

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Keep removing the duplicates and when they are all gone, the process should run and generate the bandwidth files.

Re: SNMP Bandwidth checks returning 0 bps

Posted: Tue May 23, 2017 12:04 pm
by caf_infra
tgriep wrote:The duplicate entry could be in another file and it needs to be removed. When the MRTG process find a duplicate, it does not continue on in the process so that is causing the issue.
To find the duplicate, login to the server as root and run the following.

Code: Select all

cd /etc/mrtg/conf.d
grep -R 192.168.125.254_5365 *
This will show you which file the duplicate is in and you will have to edit the file to remove it.
Then run this again to check for more duplicates.

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Keep removing the duplicates and when they are all gone, the process should run and generate the bandwidth files.
Many thanks for your suggestion.
I have found a lot of duplicating configuration definitions and deleted them.
After some time normal operation has been resumed and I can see bandwidth readings.
Will leave the VM snapshot running until tomorrow just to be on the safe side.

I believe we can close this thread.
Many Thanks for your help.

Re: SNMP Bandwidth checks returning 0 bps

Posted: Tue May 23, 2017 1:06 pm
by tgriep
Your welcome. I'll close and lock the post as solved. If you have any other questions, feel free to open a new post.