Nagios Output Not Graphing

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Nagios Output Not Graphing

Post by braindope »

Hi rkennedy,

All host in my nagios are not graphing :cry:
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios Output Not Graphing

Post by rkennedy »

How many service checks / host checks are you running on this machine? What are the specs of the machine?

Can you verify permissions on a few things and post the result -

Code: Select all

ls -l /usr/local/nagios/var
ls -l /usr/local/nagios/var/spool
ls -l /usr/local/nagios/var/spool/xidpe
ls -l /usr/local/nagios/var/spool/perfdata
Former Nagios Employee
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Nagios Output Not Graphing

Post by braindope »

Hi rkennedy,

Good day!

more or less 20 host. Please see results from the requested commands
# ls -l /usr/local/nagios/var
total 3096
drwxrwxr-x 2 nagios nagios 155648 Dec 4 00:00 archives
-rw-r--r-- 1 nagios nagios 160730 Nov 23 13:19 livestatus.log
-rwxr-xr-x 1 root root 262 Jun 24 12:09 mail.sh
-rw-r--r-- 1 root root 518738 Mar 10 2015 nagios.debug
-rw-r--r-- 1 nagios nagios 6 Nov 23 13:19 nagios.lock
-rw-r--r-- 1 nagios nagios 400799 Dec 4 20:42 nagios.log
-rw-r--r-- 1 nagios nagios 499525 Nov 23 13:19 objects.cache
-rw------- 1 nagios nagios 684413 Dec 4 20:19 retention.dat
drwxrwsr-x 2 nagios nagcmd 4096 Nov 23 13:19 rw
-rw-r--r-- 1 root root 4013 Jun 24 12:09 samplelogs2.txt
-rw-r--r-- 1 root root 5229 Jun 24 12:09 samplelogs.txt
drwxrwxr-x 3 nagios nagios 4096 Oct 24 2012 spool
-rw-rw-r-- 1 nagios nagios 683717 Dec 4 20:43 status.dat
# ls -l /usr/local/nagios/var/spool
total 16
drwxrwxr-x 2 nagios nagios 16384 Dec 4 20:44 checkresults
# ls -l /usr/local/nagios/var/spool/xidpe
ls: /usr/local/nagios/var/spool/xidpe: No such file or directory
# ls -l /usr/local/nagios/var/spool/perfdata
ls: /usr/local/nagios/var/spool/perfdata: No such file or directory
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Output Not Graphing

Post by tgriep »

Can you post your nagios.cfg and commands.cfg file here so we can review them?
I want to see if the settings are correct.

Also in this folder on your system
/usr/local/pnp4nagios/var/
The host-perfdata and service-perfdata files are really large and that could be the reason why this is failing.
Be sure to check out our Knowledgebase for helpful articles and solutions!
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Nagios Output Not Graphing

Post by braindope »

Hi,


Should i delete or backup the host-perfdata and service-perfdata files ?
Attachments
nagios.cfg
(45.88 KiB) Downloaded 517 times
commands.cfg
(92.58 KiB) Downloaded 598 times
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Output Not Graphing

Post by tgriep »

To be safe, you can make a backup of the files.

I checked the files and the commands that processes the performance data for both the host and service are missing from the commands.cfg file.
If you edit the commands.cfg file and change the following line from (Line 1708)

Code: Select all

       command_name    process-service-perfdata
to

Code: Select all

       command_name    process-service-perfdata-file
And change the following line from (Line 1713)

Code: Select all

       command_name    process-host-perfdata
to

Code: Select all

       command_name    process-host-perfdata-file
Save the file and restart nagios by running the following.

Code: Select all

service nagios restart
Wait about 20 to 30 minutes and see if the graphs start to populate again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Nagios Output Not Graphing

Post by braindope »

Hi tgriep,

after doing your suggestion, still not graphing :(
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Output Not Graphing

Post by tgriep »

Lets check the log file and see what is happening.
Can you run the following command as root and port the output?

Code: Select all

tail -200 /usr/local/pnp4nagios/var/perfdata.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Nagios Output Not Graphing

Post by braindope »

Hi,

Please see result below.

tail -200 /usr/local/pnp4nagios/var/perfdata.log
2015-12-10 10:01:37 [26778] [1] process_perfdata.pl-0.6.22 starting in SYNC Mode
2015-12-10 10:01:37 [26778] [1] Cant find Nagios Environment. Exiting ....
2015-12-10 10:01:37 [26780] [1] process_perfdata.pl-0.6.22 starting in SYNC Mode
2015-12-10 10:01:37 [26780] [1] Cant find Nagios Environment. Exiting ....
2015-12-10 10:02:07 [26890] [1] process_perfdata.pl-0.6.22 starting in SYNC Mode
2015-12-10 10:02:07 [26890] [1] Cant find Nagios Environment. Exiting ....
2015-12-10 10:02:07 [26892] [1] process_perfdata.pl-0.6.22 starting in SYNC Mode
2015-12-10 10:02:07 [26892] [1] Cant find Nagios Environment. Exiting ....
2015-12-10 10:02:37 [27269] [1] process_perfdata.pl-0.6.22 starting in SYNC Mode
2015-12-10 10:02:37 [27269] [1] Cant find Nagios Environment. Exiting ....
2015-12-10 10:02:37 [27271] [1] process_perfdata.pl-0.6.22 starting in SYNC Mode
2015-12-10 10:02:37 [27271] [1] Cant find Nagios Environment. Exiting ....
2015-12-10 10:03:07 [27447] [1] process_perfdata.pl-0.6.22 starting in SYNC Mode
2015-12-10 10:03:07 [27447] [1] Cant find Nagios Environment. Exiting ....
2015-12-10 10:03:07 [27449] [1] process_perfdata.pl-0.6.22 starting in SYNC Mode
2015-12-10 10:03:07 [27449] [1] Cant find Nagios Environment. Exiting ....
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios Output Not Graphing

Post by Box293 »

I found this:
http://serverfault.com/questions/642174 ... nvironment
Apparently it's a Nagios 4 bug, where environment data used by pnp4nagios is not provided in sync mode.

Switching to bulk+npcd mode, solved the problem.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked