PNP4nagios: Can't find Nagios Environment [SOLVED]

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.
Locked
weilah
Posts: 2
Joined: Wed Nov 05, 2014 4:56 am

PNP4nagios: Can't find Nagios Environment [SOLVED]

Post by weilah »

Hi there,

first of all I wanted to thank you all the people who make Nagios so a fantastic tool.

My system is configured as follows:
Ubuntu 14.04LTS
Nagios Core 4.0.8
Plugins @ ver 2.0.3
PNP 0.4.13

The latest apache, perl, rrdtool, etc.
Nagios has been working normally, just added a remote host for testing purposes.

I followed the PNP docs but I'm sure I did something wrong.

After compiling and installing PNP4nagios, the website was not reachable and I realized that pnp4nagios.conf was in /etc/httpd/conf.d/ so I executed

Code: Select all

./configure --with-httpd-conf=/etc/apache2/conf-available
and installed it again.

The install page then showed good and everything was green. I renamed install.php into install.done.php and configured nagios to work in Synchronous Mode.

Loading http://<server name>/pnp4nagios/ I got an error telling me that perfdata dir is empty and indeed it is.

So I ran verify_pnp_config as follows:

Code: Select all

perl verify_pnp_config -m sync -c /usr/local/nagios/etc/nagios.cfg -p /usr/local/pnp4nagios/etc
that gave the followinf output:

http://pastebin.com/m4revFW8

Maybe these lines are wrong?

[INFO] host_query =
[INFO] service_query =

Then I set in process_perfdata.cfg LOG_LEVEL 2, who tells me in perfdata.log
2014-11-05 04:37:30 [9049] [2] Using Config File /usr/local/pnp4nagios/etc/process_perfdata.cfg parameters
2014-11-05 04:37:30 [9049] [2] Default Timeout: 15 secs.
2014-11-05 04:37:30 [9049] [2] Config Timeout: 15 secs.
2014-11-05 04:37:30 [9049] [2] Actual Timeout: 15 secs.
2014-11-05 04:37:30 [9049] [1] process_perfdata.pl-0.6.24 starting in SYNC Mode
2014-11-05 04:37:30 [9049] [1] Cant find Nagios Environment. Exiting ....
I used in commands.cfg (for host and service) the commands:

command_line /usr/bin/perl /usr/local/pnp4nagios/libexec/process_perfdata.pl
command_line /usr/bin/perl /usr/local/pnp4nagios/libexec/process_perfdata.pl -d HOSTPERFDATA

or

command_line /usr/local/pnp4nagios/libexec/process_perfdata.pl
command_line /usr/local/pnp4nagios/libexec/process_perfdata.pl -d HOSTPERFDATA

or

command_line perl /usr/local/pnp4nagios/libexec/process_perfdata.pl
command_line perl /usr/local/pnp4nagios/libexec/process_perfdata.pl -d HOSTPERFDATA

But I didn't make any difference.

Does any one has a clue why PNP doesn't find Nagios Envirnoment?

Thanks



TL;DR

perfdata dir is empty
verify_pnp_config output is http://pastebin.com/m4revFW8
and perfdata.log says:
2014-11-05 04:37:30 [9049] [2] Using Config File /usr/local/pnp4nagios/etc/process_perfdata.cfg parameters
2014-11-05 04:37:30 [9049] [2] Default Timeout: 15 secs.
2014-11-05 04:37:30 [9049] [2] Config Timeout: 15 secs.
2014-11-05 04:37:30 [9049] [2] Actual Timeout: 15 secs.
2014-11-05 04:37:30 [9049] [1] process_perfdata.pl-0.6.24 starting in SYNC Mode
2014-11-05 04:37:30 [9049] [1] Cant find Nagios Environment. Exiting ....
Last edited by weilah on Wed Nov 05, 2014 10:17 am, edited 1 time in total.
weilah
Posts: 2
Joined: Wed Nov 05, 2014 4:56 am

Re: PNP4nagios: Can't find Nagios Environment

Post by weilah »

Apparently it's a Nagios 4 bug, where environment data used by pnp4nagios is not provided in sync mode.

http://www.monitoring-portal.org/wbb/in ... post210275

Switching to bulk+npcd mode, solved the problem.
Locked