Performance Graphs Stopped Working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
nik.vu
Posts: 34
Joined: Tue Feb 07, 2017 4:28 pm

Re: Performance Graphs Stopped Working

Post by nik.vu »

When i remove this two lines, MRTG shows this error.

Code: Select all

[root@nagiosxi5 ~]# time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
ERROR: could not find RRDs.pm. Use LibAdd: in mrtg.cfg to help mrtg find RRDs.pm

real    0m30.755s
user    0m30.531s
sys     0m0.200s
[root@nagiosxi5 ~]#

Code: Select all

 [root@nagiosxi5 ~]# locate RRDs.pm
/opt/rrdtool-1.4.4/lib/perl/5.10.1/x86_64-linux-thread-multi/RRDs.pm
[root@nagiosxi5 ~]#
This RRDs.pm is basically the same line that i removed.

When i back everything in prevoius state in mrtg conf

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: 32
EnableSnmpV3: yes

Include: conf.d/*.cfg

EnableSNMPv3: yes
LibAdd: /opt/rrdtool-1.4.4/lib/perl/5.10.1
This is output result of time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

Code: Select all

real    7m44.053s
user    3m55.069s
sys     0m17.407s
You have mail in /var/spool/mail/root
[root@nagiosxi5 ~]#
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Performance Graphs Stopped Working

Post by tgriep »

Even with MRTG setup with 32 forks, it is taking over 5 minutes to run and it needs to be brought down to less than 5 minutes.
What you can do it to run the following command and look in the /tmp/mrtg.txt file for any unused devices. Then remove the file from the /etc/cron.d folder it it doesn't get checked anymore.

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base &> /tmp/mrtg.txt
Hopefully that will speed thing up.
Be sure to check out our Knowledgebase for helpful articles and solutions!
nik.vu
Posts: 34
Joined: Tue Feb 07, 2017 4:28 pm

Re: Performance Graphs Stopped Working

Post by nik.vu »

Just one explanation, which file i need to remove from /etc/cron.d folder?

Code: Select all

[root@nagiosxi5 cron.d]# ls
0hourly  mrtg  nagiosxi  ntpdate  raid-check  sysstat
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Performance Graphs Stopped Working

Post by tgriep »

Sorry, my mistake, I posted the wrong folder.
After running the command from my previous post, some of the devices will time out and if they do not exist, you can remove the MRTG config file to make the process run quicker.
The configuration files that MRTG uses are in this folder

Code: Select all

/etc/mrtg/conf.d
Be sure to check out our Knowledgebase for helpful articles and solutions!
nik.vu
Posts: 34
Joined: Tue Feb 07, 2017 4:28 pm

Re: Performance Graphs Stopped Working

Post by nik.vu »

You can close this topic as resolved. It was to many errors, mostly of some deleted hosts. Now everything is ok.
kyang

Re: Performance Graphs Stopped Working

Post by kyang »

Sounds good! I'll be closing this thread!

If you have any more questions, feel free to create another thread.

Thanks for using the Nagios Support Forum!
Locked