NCPA not sending passive check results to Nagios Core 4.4.3

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.
hpzaramk
Posts: 25
Joined: Wed Nov 21, 2018 12:06 am

NCPA not sending passive check results to Nagios Core 4.4.3

Post by hpzaramk »

Hi,

I am new to Nagios and implementing NCPA passive monitoring that sends to Nagios Core.

NCPA 2.9.1 is successfully installed on a Windows 2012 and configured ncpa.cfg for passive check monitoring.

The host and service definitions is not configured, however the passive results are not arrived in "/usr/local/nagios/var/nagios.log".

NRDP is configured on Nagios core and here is the setting on config.inc.php:

// The name of the system group that has write permissions to the external command file
// this group is also used to set file permissions when writing bulk commands or passive check results
// NOTE: both the Apache and Nagios users must be a member of this group
$cfg["nagios_command_group"] = "nagcmd";

// Full path to Nagios external command file
$cfg["command_file"] = "/usr/local/nagios/var/rw/nagios.cmd";

Below is the contents of C:\Program Files (x86)\Nagios\NCPA\var\log\ncpa_passive.log from NCPA client on the monitored host:

2019-09-12 08:14:27,158:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-12 08:19:27,767:WARNING:nrdp:XML returned did not contain a message, or was malformed.

Thanks,
Ram.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by mbellerue »

Can you post, or PM me your ncpa.cfg file from your Windows machine?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
hpzaramk
Posts: 25
Joined: Wed Nov 21, 2018 12:06 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by hpzaramk »

Hi,

Please find the ncpa_passive.log from the Windows host.

Thanks,
Ram.
Attachments
ncpa_passive.log
ncpa_passive.log
(69.09 KiB) Downloaded 160 times
hpzaramk
Posts: 25
Joined: Wed Nov 21, 2018 12:06 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by hpzaramk »

Hi,

Looks like my post that contains the file attachment is not successfully posted here.. Here are the log lines from the ncpa_passive.log on windows host and there is no additional data in the log:

2019-09-13 04:21:40,398:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 04:26:41,253:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 04:31:42,102:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 04:36:43,082:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 04:41:44,448:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 04:46:43,836:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 04:51:43,996:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 04:56:44,214:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 05:01:44,494:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 05:06:44,645:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 05:11:44,993:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 05:16:45,065:WARNING:nrdp:XML returned did not contain a message, or was malformed.
2019-09-13 05:21:45,384:WARNING:nrdp:XML returned did not contain a message, or was malformed.

Thanks,
Ram.
hpzaramk
Posts: 25
Joined: Wed Nov 21, 2018 12:06 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by hpzaramk »

In addition to the above NCPA log, Whenever I do "Submit JSON Check Result" from NRDP URL, the below lines gets recorded in the apache error log "/var/log/httpd/error_log". Is it due to any user level privilege issue..


[Fri Sep 13 08:46:39.884280 2019] [:error] [pid 16945] [client 143.34.102.3:61701] PHP Notice: Undefined index: checkresult in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 161, referer: http://adlg3623.na.pg.com/nrdp/
[Fri Sep 13 08:46:39.884364 2019] [:error] [pid 16945] [client 143.34.102.3:61701] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 161, referer: http://adlg3623.na.pg.com/nrdp/
[Fri Sep 13 08:46:39.884379 2019] [:error] [pid 16945] [client 143.34.102.3:61701] PHP Notice: Undefined index: hostname in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 168, referer: http://adlg3623.na.pg.com/nrdp/
[Fri Sep 13 08:46:39.884389 2019] [:error] [pid 16945] [client 143.34.102.3:61701] PHP Notice: Undefined index: state in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 169, referer: http://adlg3623.na.pg.com/nrdp/
[Fri Sep 13 08:46:39.884407 2019] [:error] [pid 16945] [client 143.34.102.3:61701] PHP Notice: Undefined index: output in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 170, referer: http://adlg3623.na.pg.com/nrdp/

Thanks,
Ram.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by mbellerue »

Can you send me the output of,

Code: Select all

md5sum /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php
Also, what version of Nagios Core are you running?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
hpzaramk
Posts: 25
Joined: Wed Nov 21, 2018 12:06 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by hpzaramk »

Hi,

Please refer the below output:

# md5sum /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php
8fc47c7afc82c9ee201d544554202c40 /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php

Version of Nagios Core is 4.4.3.

Thanks,
Ram.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by mbellerue »

Edit /usr/local/nrdp/server/config.inc.php, and find $cfg["debug"] = false;, and change that to true. Then submit a JSON check result, and let Windows send a check result or two as well.

Then PM me /usr/local/nrdp/server/debug.log, as well as your Apache error log, and I'll take a look at them.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
hpzaramk
Posts: 25
Joined: Wed Nov 21, 2018 12:06 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by hpzaramk »

I have set the debug to true and submitted JSON result from NRDP URL. The debug.log file is not created. Please refer below outputs from the server. Attached the apache error log "error_log". It says no permission to write the contents in /usr/local/nrdp/server/debug.log.. Please review the log and help to resolve the issue.

# grep -i debug /usr/local/nrdp/server/config.inc.php
// Enable debug logging
$cfg["debug"] = true;
$cfg["debug_log"] = "/usr/local/nrdp/server/debug.log";


# ls -l "/usr/local/nrdp/server/debug.log"
ls: cannot access /usr/local/nrdp/server/debug.log: No such file or directory

Thanks,
Ram.
Attachments
error_log.txt
Apache error log
(23.83 KiB) Downloaded 147 times
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA not sending passive check results to Nagios Core 4.

Post by mbellerue »

Huh, looks like it's not automatically creating the debug log file. Try these commands,

Code: Select all

touch /usr/local/nrdp/server/debug.log
chown nagios:nagios /usr/local/nrdp/server/debug.log
Then wait for a few passive checks to try to come in, and then send the debug.log file in.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked