NagiosXI not reporting bandwidth of any interface

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tbs-infrastructure
Posts: 26
Joined: Mon Apr 08, 2019 3:47 pm

NagiosXI not reporting bandwidth of any interface

Post by tbs-infrastructure »

After upgrading to version 5.6.4. NagiosXI stopped reporting bandwidth of the interface, graphs come with a flat line.
tbs-infrastructure
Posts: 26
Joined: Mon Apr 08, 2019 3:47 pm

Re: NagiosXI not reporting bandwidth of any interface

Post by tbs-infrastructure »

Here an example:
/usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/pdfirewall_500040110.rrd -w 5.00,5.00 -c 8.00,8.00 -l G
OK - Current BW in: 0Gbps Out: 0Gbps|in=0Gb/s;5.00;8.00 out=0Gb/s;5.00;8.00

Current is always 0, these is happening for switches and firewalls.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: NagiosXI not reporting bandwidth of any interface

Post by tgriep »

What OS and release is the Nagios server running?

First, make sure the Network Switch / Router wizard in XI is the latest version by logging in to the XI GUI and going to the Admin > Manage Config Wizards menu.
Click the Check for Updates button and update the Network Switch / Router wizard.
Then run the following as root to set the permissions of the files the wizard / plugin use to get the bandwidth information.

Code: Select all

chown apache:nagios /etc/mrtg -R
chmod 775 /etc/mrtg -R
chown apache:nagios /var/lib/mrtg -R
chmod 775 /var/lib/mrtg -R
Let the system run for 15 minutes and see if the issue has been resolved.

If the Bandwidth is still zero, try this, edit the /etc/cron.d/mrtg file and change this line from

Code: Select all

*/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 --user=nagios --group=nagios
to

Code: Select all

*/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
Save the change and restart cron by running

Code: Select all

service crond restart
Wait for 20 minutes and see if you start to see the bandwidth.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tbs-infrastructure
Posts: 26
Joined: Mon Apr 08, 2019 3:47 pm

Re: NagiosXI not reporting bandwidth of any interface

Post by tbs-infrastructure »

We are using Centos 7.
The changes did not produce any result.
tbs-infrastructure
Posts: 26
Joined: Mon Apr 08, 2019 3:47 pm

Re: NagiosXI not reporting bandwidth of any interface

Post by tbs-infrastructure »

Forgot the Nagios version 5.6.4
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: NagiosXI not reporting bandwidth of any interface

Post by tgriep »

Can you run the following commands as root and post the the /tmp/mrtg.txt file here so we can view it for any errors?

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base,log &> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg &>> /tmp/mrtg.txt
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 &>> /tmp/mrtg.txt
{ time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg 2>1 ; } 2>> /tmp/mrtg.txt
Thanks.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tbs-infrastructure
Posts: 26
Joined: Mon Apr 08, 2019 3:47 pm

Re: NagiosXI not reporting bandwidth of any interface

Post by tbs-infrastructure »

Attached find the results.
I have also tried to run a new wizard for a network device and it also reports bandwidth 0.
Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: NagiosXI not reporting bandwidth of any interface

Post by tgriep »

I found these messages which is causing the MRTG process to exit before gathering the bandwidth data.
WARNING: "Title[10.4.0.71_8]" not specified
WARNING: "MaxBytes[10.4.0.71_8]" not specified
WARNING: I can't find a "target[10.4.0.71_8]" definition
ERROR: Please fix the error(s) in your config file

Go to the /etc/mrtg/conf.d folder and edit this file 10.4.0.71.cfg
Find this line and comment it out.

Code: Select all

noHC[10.4.0.71_8]: no
Save the change and run this command again to see if it filishes.

Code: Select all

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
If not, fix the error and re-run it until all of them are fixed and the MRTG process should start to gather the bandwidth data again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tbs-infrastructure
Posts: 26
Joined: Mon Apr 08, 2019 3:47 pm

Re: NagiosXI not reporting bandwidth of any interface

Post by tbs-infrastructure »

After running the command:
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

got these errors:

2019-07-16 08:42:24: WARNING: Expected a number but got 'noSuchInstance'
2019-07-16 08:42:24: WARNING: Expected a number but got 'noSuchInstance'
2019-07-16 08:42:28: ERROR: Target[pdfirewall_25][_IN_] ' $target->[14]{$mode} ' did not eval into defined data
2019-07-16 08:42:28: ERROR: Target[pdfirewall_25][_OUT_] ' $target->[14]{$mode} ' did not eval into defined data
tbs-infrastructure
Posts: 26
Joined: Mon Apr 08, 2019 3:47 pm

Re: NagiosXI not reporting bandwidth of any interface

Post by tbs-infrastructure »

The bandwidth is now reporting on most devices, however, on one of firewalls, the aggregated interfaces it's not. It is back to the same issue we had last week...
Locked