MRTG and graphs not showing any data

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
krw
Posts: 71
Joined: Tue May 29, 2012 2:01 pm

MRTG and graphs not showing any data

Post by krw »

Have had NagiosXI for years now and for the most part has been ok for alerting, but not really used it for graphing bandwidth all that much
as we roll our own via MRTG/SNMP directly as we control the look completely via rrdtool. And we have some Cacti stuff too.

Nagios version 5.11.3

I was recently trying to browse the graphs that apparently Nagios should be collecting but all of them are empty.

Started trying to figure out why from here:
https://support.nagios.com/kb/article/ ... hs-29.html

Going through that list the only thing I found that was missing was

/var/lock/mrtg

so created that directory.

/etc/mrtg/conf.d has all the CFG files needed for MRTG. In that directory the .cfg files are stamped Feb 2 2022.

In /etc/mrtg I can see mrtg.ok being created everytime it runs.

One thing I have found in the directory:

/usr/local/nagios/share/perfdata

Where the performance data is stored for each device that the RRD files for each of the
devices is not being updated, but the XML files are.

And all the RRD files in those device directories are also stamped the same day as the files in /etc/mrtg/conf.d.

So it appears that MRTG stopped updating all RRD files in those directories, but in /var/lib/mrtg the RRD files are
being updated as expected.

I'm not sure which RRD's that NagiosXI uses to create the bandwidth graphs but from what I can tell MRTG is running every 5 mins
and updating the RRD's in /var/lib/mrtg but none of the RRD's in /usr/local/nagios/share/perfdata
.

/etc/mrtg/mrtg.cfg file:
HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogFormat: rrdtool
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg
WorkDir: /var/lib/mrtg
Forks: 4
EnableSnmpV3: yes

Include: conf.d/*.cfg

#LibAdd: /opt/rrdtool-1.4.4/lib/perl/5.10.1
Something I just realized on Feb 2 2022 I copied over the mrtg.cfg to a backup and in the prod version I commented out
the LibAdd line as these errors started coming up:

WARN: found several copies of RRDs.pm in your path: /opt/rrdtool-1.4.4/lib/perl/5.10.1//x86_64-linux-thread-multi, /usr/lib64/perl5/vendor_perl I will be using /opt/rrdtool-1.4.4/lib/perl/5.10.1//x86_64-linux-thread-multi. This could be a problem if this is an old copy and you think I would be using a newer one!
Can't load '/opt/rrdtool-1.4.4/lib/perl/5.10.1/x86_64-linux-thread-multi//auto/RRDs/RRDs.so' for module RRDs: libpng12.so.0: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190.
at /usr/bin/mrtg line 340.
Compilation failed in require at /usr/bin/mrtg line 340.


And thats when RRD files stopped being updated.

RRDs.pm:

locate RRDs.pm
/home/keith/rrdtool-1.4.4/lib/perl/5.10.1/x86_64-linux-thread-multi/RRDs.pm
/opt/rrdtool-1.4.4/lib/perl/5.10.1/x86_64-linux-thread-multi/RRDs.pm
/usr/lib64/perl5/vendor_perl/RRDs.pm

Which one should be used here?

And just one last note, I have absolutely no stats for anything. No ping stats, no capacity planning stats, no bandwidth graphs, no performace graphs. Anything that would have a graph is blank. MRTG is running and it appears at least *SOME* stats are being collected but every graph I have checked is:

No Data to Display.

The only thing NagiosXI is doing right now is alerting if something goes down.

Thanks.
User avatar
lgute
Posts: 314
Joined: Mon Apr 06, 2020 2:49 pm

Re: MRTG and graphs not showing any data

Post by lgute »

Hi @krw, thanks for reaching out.

The article you listed is best for troubleshooting issues with MRTG rrd's. This one is for troubleshooting everything else performance data related.

My vanilla install of 5.11.3 /etc/mrtg/mrtg.cfg looks like this...

Code: Select all

HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogFormat: rrdtool
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg
WorkDir: /var/lib/mrtg
Forks: 4
EnableSnmpV3: yes

Include: conf.d/*.cfg

EnableSNMPv3: yes
Not sure why EnableSNMPv3 is in there twice.

The only RRDs.pm file I have is...

Code: Select all

/usr/lib64/perl5/vendor_perl/RRDs.pm
Please let us know if you have any other questions or concerns.

-Laura