Page 1 of 2

NagiosXI not reporting bandwidth of any interface

Posted: Mon Jul 15, 2019 12:42 pm
by tbs-infrastructure
After upgrading to version 5.6.4. NagiosXI stopped reporting bandwidth of the interface, graphs come with a flat line.

Re: NagiosXI not reporting bandwidth of any interface

Posted: Mon Jul 15, 2019 1:20 pm
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.

Re: NagiosXI not reporting bandwidth of any interface

Posted: Mon Jul 15, 2019 1:48 pm
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.

Re: NagiosXI not reporting bandwidth of any interface

Posted: Mon Jul 15, 2019 2:36 pm
by tbs-infrastructure
We are using Centos 7.
The changes did not produce any result.

Re: NagiosXI not reporting bandwidth of any interface

Posted: Mon Jul 15, 2019 2:38 pm
by tbs-infrastructure
Forgot the Nagios version 5.6.4

Re: NagiosXI not reporting bandwidth of any interface

Posted: Mon Jul 15, 2019 2:46 pm
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.

Re: NagiosXI not reporting bandwidth of any interface

Posted: Mon Jul 15, 2019 3:04 pm
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

Re: NagiosXI not reporting bandwidth of any interface

Posted: Mon Jul 15, 2019 4:38 pm
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.

Re: NagiosXI not reporting bandwidth of any interface

Posted: Tue Jul 16, 2019 7:47 am
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

Re: NagiosXI not reporting bandwidth of any interface

Posted: Tue Jul 16, 2019 8:43 am
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...