Page 3 of 4

Re: Nagios Output Not Graphing

Posted: Wed Dec 02, 2015 11:40 pm
by braindope
Hi rkennedy,

All host in my nagios are not graphing :cry:

Re: Nagios Output Not Graphing

Posted: Thu Dec 03, 2015 3:00 pm
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

Re: Nagios Output Not Graphing

Posted: Fri Dec 04, 2015 7:56 am
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

Re: Nagios Output Not Graphing

Posted: Fri Dec 04, 2015 11:37 am
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.

Re: Nagios Output Not Graphing

Posted: Mon Dec 07, 2015 12:17 am
by braindope
Hi,


Should i delete or backup the host-perfdata and service-perfdata files ?

Re: Nagios Output Not Graphing

Posted: Mon Dec 07, 2015 2:54 pm
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.

Re: Nagios Output Not Graphing

Posted: Wed Dec 09, 2015 2:46 am
by braindope
Hi tgriep,

after doing your suggestion, still not graphing :(

Re: Nagios Output Not Graphing

Posted: Wed Dec 09, 2015 3:41 pm
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

Re: Nagios Output Not Graphing

Posted: Wed Dec 09, 2015 9:29 pm
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 ....

Re: Nagios Output Not Graphing

Posted: Wed Dec 09, 2015 10:06 pm
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.