Page 1 of 2

Newly added services - 0 bandwidth issue

Posted: Wed Nov 21, 2018 10:52 am
by jacek
Hi,

I noticed, that newly added services to Nagios XI result in flat graphs.
I went trough the whole article: https://support.nagios.com/kb/article.p ... ategory=44

I have no issues within MRTG, all files are being created, rrd files are there, but if I run the check I get only nulls:

Code: Select all

/usr/local/nagios/libexec/check_rrdtraf -f '/var/lib/mrtg/172.16.10.150_3.rrd' -w 1 -c 2
OK - Current BW in: 0bps Out: 0bps|in=0b/s;1;2 out=0b/s;1;2
I ran out of ideas, the only hint is, that this is only happening for newly added things, all "old" graphs are just fine and returning valid data.
Any ideas? Corrupted wizard? (I'm using the network switch/router 2.4.0 and I believe that the previous version had the same issue).

Thanks!

Re: Newly added services - 0 bandwidth issue

Posted: Wed Nov 21, 2018 1:16 pm
by ssax
What was the full output of this command?

Code: Select all

time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
What about this command?

Code: Select all

rrdtool lastupdate /var/lib/mrtg/172.16.10.150_3.rrd
Additionally, please PM me a copy of your profile, you can download it from Admin > System Profile > Download Profile so that I can look through your logs/configuration as well.

Thank you

Re: Newly added services - 0 bandwidth issue

Posted: Wed Nov 21, 2018 2:01 pm
by jacek
Way below 5 minutes ;-)

Code: Select all

time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

real    0m44.152s
user    0m4.570s
sys     0m0.257s
This one suddenly started working maybe due to me deleting some files (only for that IP):

Code: Select all

rrdtool lastupdate /var/lib/mrtg/172.16.23.251_2.rrd
 ds0 ds1

1542826205: 3393720657 11220519847
This one is working all the time.

Code: Select all

rrdtool lastupdate /var/lib/mrtg/172.16.10.100_11148.rrd
 ds0 ds1

1542826224: 860387268972 402285654279
This one has been added to nagios as a test device and looking at the time it has been added to nagios AFTER the first example suddenly started working...

Code: Select all

rrdtool lastupdate /var/lib/mrtg/172.16.10.150_1.rrd
 ds0 ds1

1542825890: 601806655 4178154798
PMed you the profile as well, thanks!

Re: Newly added services - 0 bandwidth issue

Posted: Wed Nov 21, 2018 2:57 pm
by ssax
What about this one?

Code: Select all

rrdtool lastupdate /var/lib/mrtg/172.16.10.150_3.rrd
Is that one still having issues? Please PM me that file if it's still having issues.

Let's work on the ones that are having issues.

Re: Newly added services - 0 bandwidth issue

Posted: Wed Nov 21, 2018 3:25 pm
by jacek
PM sent.

The one attached should show some traffic.
I noticed that it has other permissions than the other files, but the one I had issues before and are gone have the same permissions.
I corrected them to reflect all other files settings:

Before:

Code: Select all

-rw-r--r--   1 apache apache 105312 Nov 21 18:45 172.16.10.150_1.rrd
-rw-r--r--   1 apache apache 105312 Nov 21 18:45 172.16.10.150_2.rrd
-rw-r--r--   1 apache apache 105312 Nov 21 18:45 172.16.10.150_3.rrd
After:

Code: Select all

-rwxrwxr-x 1 apache apache 105312 Nov 21 18:45 172.16.10.150_1.rrd
-rwxrwxr-x 1 apache apache 105312 Nov 21 18:45 172.16.10.150_2.rrd
-rwxrwxr-x 1 apache apache 105312 Nov 21 18:45 172.16.10.150_3.rrd

Re: Newly added services - 0 bandwidth issue

Posted: Sun Nov 25, 2018 6:42 am
by jacek
Any ideas? Nothing changed for me, newly added services are still resulting in a 0 bandwidth...

Re: Newly added services - 0 bandwidth issue

Posted: Mon Nov 26, 2018 2:35 pm
by ssax
Did this start happening after an upgrade? What version of XI are you running?

Re: Newly added services - 0 bandwidth issue

Posted: Mon Nov 26, 2018 3:11 pm
by jacek
I upgraded to 5.5.7 on 2018-11-17, so its only a week ago, sounds possible?

Re: Newly added services - 0 bandwidth issue

Posted: Mon Nov 26, 2018 4:33 pm
by ssax
It may be related. What is the output of this command?

Code: Select all

cat /etc/cron.d/mrtg
If you see the --user=nagios and --group=nagios options on the end of the output like this:

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
Edit the /etc/cron.d/mrtg file and change it 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
After the change, wait 15 minutes to make sure it polls enough data, then see if the issue is resolved.

Let us know the results.

Thank you

Re: Newly added services - 0 bandwidth issue

Posted: Mon Nov 26, 2018 5:11 pm
by jacek
ssax, this worked like a charm!

Is this an update related bug?