Page 2 of 4

Re: Bandwidth Graph Reports No Traffic

Posted: Fri Oct 28, 2016 11:06 am
by avandemore
Profile received.

Is this a profile from an earlier time? The settings for npcd and perdata logging are the default so I am unclear as to what was changed.
I also confirmed that the RRD file in question is actually there.
Please copy/paste the output of this process.

Re: Bandwidth Graph Reports No Traffic

Posted: Fri Oct 28, 2016 12:27 pm
by sfudali
I had disabled the additional logging before I had done the profile. I will enable logging and let it run for a bit and re-send the profile download.

As for the RRD file, I went to /usr/local/nagios/share/perfdata/<device in question>/ and looked in the directory and saw the RRD file and the XML file there for the graph I'm trying to do.

Re: Bandwidth Graph Reports No Traffic

Posted: Fri Oct 28, 2016 2:36 pm
by tgriep
Take a look at this KB article to fix the bandwidth issue you are having.
https://support.nagios.com/kb/article.php?id=511

Re: Bandwidth Graph Reports No Traffic

Posted: Fri Oct 28, 2016 2:46 pm
by sfudali
When I run the command
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
, I do not get any error output and it reports my current MRTG version as 2.17.4 already.

Re: Bandwidth Graph Reports No Traffic

Posted: Mon Oct 31, 2016 1:29 pm
by rkennedy
Just to make sure I understand properly -
The only difference between this graph and another functional bandwidth graph is that this one was created manually as opposed to the other which was created when the host was first added via the wizard.
Did you copy this service, and then just change $ARG1$ to be equal to a RRD file? This will not work, because the wizard will create the MRTG configuration file in the back end, which then in turn powers the sourced graph here.

What is the full output of the following? ls -la /var/lib/mrtg/

Re: Bandwidth Graph Reports No Traffic

Posted: Mon Oct 31, 2016 2:31 pm
by sfudali
I manually added a new service to the existing host. At first it was complaining that there was no RRD file when I attempted to save the configuration, but then it stopped complaining so I thought that whatever process needed to run to create the file. Perhaps that's the root cause of my issue. When I look through ls -la /var/lib/mrtg/, I do not see a corresponding RRD file in that directory for the host/port I'm trying to graph. What is the manual command to great the MRTG configuration file? I can run that and see if the problem resolves itself.

Re: Bandwidth Graph Reports No Traffic

Posted: Mon Oct 31, 2016 2:59 pm
by avandemore
The quick fix is to edit /etc/cron.d/mrtg. Change:

Code: Select all

*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
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
The permanent fix will be included in 5.3.2.

Re: Bandwidth Graph Reports No Traffic

Posted: Mon Oct 31, 2016 4:12 pm
by sfudali
No change in behavior. I do see .rrd files for the host/port in /var/lib/mrtg, however graph still reports 0 traffic.

Re: Bandwidth Graph Reports No Traffic

Posted: Mon Oct 31, 2016 4:19 pm
by avandemore
What is the output from #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 ?

Also try restarting cron: service crond restart

Re: Bandwidth Graph Reports No Traffic

Posted: Mon Oct 31, 2016 4:29 pm
by sfudali
When I run that I get no output...I'm returned back to my command line. I had rebooted the server after making the change to the file thinking there was related services that would need a reboot.