NCPA - error - Unable to run check on non-child node

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
comfone
Posts: 127
Joined: Fri May 01, 2015 3:28 am

NCPA - error - Unable to run check on non-child node

Post by comfone »

Hi All
I'm trying to run the plugin "check_windows_updates.ps1" using NCPA in passiv mode.
After having configured everything and restarted the NCPA services on the Windows Server, I get the correct message over NRDP to our Nagios XI Server.
But after 5 minutes the passive service on the Nagiox XI reports "Unknown" with the "Status Information" Unable to run check on non-child node. Revise your query.
Further below my ncpa.cfg file.
Why does it after a manual restart of the NCPA services work, but after the scheduled "sleep of 300" gives me an error?

[listener]
uid = nagios
certificate = adhoc
loglevel = info
ip = 0.0.0.0
gid = nagcmd
logfile = var/ncpa_listener.log
port = 5693
pidfile = var/ncpa_listener.pid
# Available versions: PROTOCOL SSLv2, SSLv3, TLSv1
ssl_version = TLSv1

[passive]
uid = nagios
handlers = nrdp
loglevel = info
gid = nagcmd
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid

[nrdp]
token =******
hostname =csvit111
parent =http://10.20.98.21/nrdp/

[nrds]
URL =None
CONFIG_VERSION = None
TOKEN = None
CONFIG_NAME = None
CONFIG_OS = None
PLUGIN_DIR=plugins/
UPDATE_CONFIG=0
UPDATE_PLUGINS=1

[api]
community_string =****

[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
# .ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name
.vbs = cscript $plugin_name $plugin_args //NoLogo

[passive checks]
%HOSTNAME%|WinUpdates = /agent/plugin/check_windows_updates.ps1
#%HOSTNAME%|cpu usage = /cpu/percent --warning 20 --critical 30
#%HOSTNAME%|swap usage = /memory/swap/percent --warning 40 --critical 80
#%HOSTNAME%|memory usage = /memory/virtual/percent --warning 60 --critical 80
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NCPA - error - Unable to run check on non-child node

Post by rkennedy »

Can you confirm what version of NCPA you are running?

I believe this may be related to an earlier bug here, https://github.com/NagiosEnterprises/ncpa/issues/95.
Former Nagios Employee
comfone
Posts: 127
Joined: Fri May 01, 2015 3:28 am

Re: NCPA - error - Unable to run check on non-child node

Post by comfone »

We are running Nagios XI 5.2.3 and NPCA 1.8.1.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA - error - Unable to run check on non-child node

Post by lmiltchev »

Change this:

Code: Select all

%HOSTNAME%|WinUpdates = /agent/plugin/check_windows_updates.ps1
to this:

Code: Select all

%HOSTNAME%|WinUpdates = agent/plugin/check_windows_updates.ps1
(remove the "/" before "agent").

Restart the NCPA Passive service and see if the output will change next time the check is run.
Be sure to check out our Knowledgebase for helpful articles and solutions!
comfone
Posts: 127
Joined: Fri May 01, 2015 3:28 am

Re: NCPA - error - Unable to run check on non-child node

Post by comfone »

s you can see below, I removed the "/" before "agent" but my problem still persists.


[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
# .ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name
.vbs = cscript $plugin_name $plugin_args //NoLogo

[passive checks]
%HOSTNAME%|WinUpdates = agent/plugin/check_windows_updates.ps1
#%HOSTNAME%|cpu usage = /cpu/percent --warning 20 --critical 30
#%HOSTNAME%|swap usage = /memory/swap/percent --warning 40 --critical 80
#%HOSTNAME%|memory usage = /memory/virtual/percent --warning 60 --critical 80

Any other suggestion?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA - error - Unable to run check on non-child node

Post by lmiltchev »

I believe I misled you about the "/". :(
It worked for me (temporarily) only because I restarted the NCPA Passive service. It seems like this is a bug. The check works on the first run, then it fails with the "Unable to run check on non-child node. Revise your query." error.

First run:
example01.PNG
Any of the following runs:
example02.PNG
FYI, I added a comment here:

https://github.com/NagiosEnterprises/ncpa/issues/97

Our developers will be looking into this as soon as they can. Thanks!
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
comfone
Posts: 127
Joined: Fri May 01, 2015 3:28 am

Re: NCPA - error - Unable to run check on non-child node

Post by comfone »

Hi lmiltchev
Thank you for the feedback.
Looking forward for the fix ;)
Cheers,
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA - error - Unable to run check on non-child node

Post by lmiltchev »

You are welcome! I will be locking this topic now. If you have any other questions/issues, start a new thread. If you need this topic to be re-opened, PM me. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked