Page 1 of 2
NCPA passive not working after upgrade to 5.7.1
Posted: Tue Jul 28, 2020 1:08 pm
by bpennin
All,
I can configure a host using NCPA wizard and works fine for active checks. The passive checks return no data received yet. I have triple checked the inbound and the ncpa.cfg on my host. Anyone having issues after upgrading with passive? RHEL 7 Nagios XI server with windows/linux/aix clients. I can get to and from hosts with ports so not firewall issue. I can also use the NCPA gui with no issues.
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Wed Jul 29, 2020 12:40 pm
by benjaminsmith
Hi,
Usually, when there is the no data received that means you did get the passive checks configured but it hasn't received an update. What as the time of the last check result?
Are you able to submit a test passive check result from the NRDP GUI? Go to Admin > Check Transfers > Inbound Transfers and click the NRDP API link.
Lastly, are you seeing any check results coming in the nagios.log?
Reference:
Configuring Passive Services With Nagios XI
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Wed Jul 29, 2020 2:28 pm
by bpennin
Submit Nagios Command and Submit Check Result are both working. When I look at the nagios.log I do not see anything coming in from the two hosts I am testing with. Active checks for those hosts are fine and pending checks for all passive. Both hosts did not have a time for last checked until I force a check on all services. They state OK: No data received yet after the force.
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Wed Jul 29, 2020 3:17 pm
by lmiltchev
Do you see any clues in the ncpa_passive.log? It is usually located in the "C:\Program Files (x86)\Nagios\NCPA\var\log" directory.
If you don't see much in the log, you could change the log level for the ncpa_passive.log to "debug" in the ncpa.cfg file, and restart both ncpa services. Can you show us the entire ncpa.cfg file and the config file, where your passive checks are defined? Hide/obfuscate any sensitive info.
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Thu Jul 30, 2020 10:52 am
by bpennin
I have uploaded a server profile, ncpa_listener, and ncpa_passive DEBUG logs from an AIX system.
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Thu Jul 30, 2020 1:51 pm
by lmiltchev
I have uploaded a server profile, ncpa_listener, and ncpa_passive DEBUG logs from an AIX system.
Did you forget to upload the NCPA logs? I can only see the profile, and NCPA configs...
Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Thu Jul 30, 2020 3:02 pm
by bpennin
Sorry - I did forget to send the passive log. Debug was on and I started the systemctl ncpa_passive service up and let it run for a bit. The listener log is empty though??
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Fri Jul 31, 2020 8:31 am
by bpennin
I see the below in the ssl_error_log:
SAMPLE - there are a ton of these....
[Fri Jul 31 09:24:16.284833 2020] [:error] [pid 10027] [client 10.224.132.34:60854] PHP Warning: chgrp(): Operation not permitted in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 239
[Fri Jul 31 09:24:16.285126 2020] [:error] [pid 10027] [client 10.224.132.34:60854] PHP Warning: chgrp(): Operation not permitted in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 239
[Fri Jul 31 09:24:16.285423 2020] [:error] [pid 10027] [client 10.224.132.34:60854] PHP Warning: chgrp(): Operation not permitted in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 239
[Fri Jul 31 09:24:16.285712 2020] [:error] [pid 10027] [client 10.224.132.34:60854] PHP Warning: chgrp(): Operation not permitted in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 239
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Fri Jul 31, 2020 9:15 am
by lmiltchev
It seems like a permissions issue. Have you made any changes to the system lately, e.g. hardening the server?
Can you run the following commands and show the output?
Code: Select all
grep nagios /etc/passwd
grep nag /etc/group
chage -l nagios
grep -i nagios /etc/sudoers
ls -lad /usr/local /usr/local/nrdp/ /usr/local/nrdp/server/
Also, run:
Code: Select all
ls -laR /usr/local/nrdp > /tmp/perms
and post the
perms file that was generated in the /tmp directory from running the command above.
BTW, if you run the command below and watch it for a while, do you see any files showing up?
Code: Select all
watch -n 1 'ls /usr/local/nagios/var/spool/checkresults'
Note: If you are using ramdisk, you may need to run:
Code: Select all
watch -n 1 'ls /var/nagiosramdisk/spool/checkresults'
Re: NCPA passive not working after upgrade to 5.7.1
Posted: Fri Jul 31, 2020 2:02 pm
by bpennin
All working now. The problem was nagcmd was missing from /etc/group. I compared it to another Nagios XI server and found that was somehow eliminated from /etc/group. These servers are AD Linux boxes and I think it got removed in the conversion. I added:nagcmd

50468:apache,nagios to the /etc/group file and restarted everything. You may close this thread and thanks for your help!