Unable to run check on non-child node. Revise your query

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jcwuerfl
Posts: 76
Joined: Tue Jun 10, 2014 12:44 pm

Unable to run check on non-child node. Revise your query

Post by jcwuerfl »

Why doesn't this produce an alert of some kind ?

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_ncpa.py -H hostname.domain.com -t 'password' -P 5693 -M 'disk/logical/\|dbdata/used_percent' -w 90 -c 95
OUTPUT: Unable to run check on non-child node. Revise your query.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to run check on non-child node. Revise your query

Post by lmiltchev »

Why doesn't this produce an alert of some kind ?
It is because the check is configured properly - only testing (from within CCM) fails. The "error" output is caused by escaping issues.

So, instead of running this:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H hostname.domain.com -t 'password' -P 5693 -M 'disk/logical/\|dbdata/used_percent' -w 90 -c 95
try running this from the command line:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H hostname.domain.com -t 'password' -P 5693 -M 'disk/logical/|dbdata/used_percent' -w 90 -c 95
(remove the "\" in front of the pipe).
Be sure to check out our Knowledgebase for helpful articles and solutions!
jcwuerfl
Posts: 76
Joined: Tue Jun 10, 2014 12:44 pm

Re: Unable to run check on non-child node. Revise your query

Post by jcwuerfl »

Currently I have /dbdata unmounted.

This :

Code: Select all

'disk/logical/|dbdata/used_percent'
Gives me :

Code: Select all

File returned contained:
{
  "value": {
    "returncode": 0,
    "stdout": "OK: used_percent was 6% | 'used_percent_0'=6%;90;95;"
  }
}
OK: used_percent was 6% | 'used_percent_0'=6%;90;95;




The below doesn't work and does give me the error, however it gives me the same error with hosts with /dbdata mounted?

Code: Select all

-M 'disk/logical/\|dbdata/used_percent'

error:

Code: Select all

File returned contained:
{
  "value": {
    "returncode": 3,
    "stdout": "Unable to run check on non-child node. Revise your query."
  }
}
Unable to run check on non-child node. Revise your query.
jcwuerfl
Posts: 76
Joined: Tue Jun 10, 2014 12:44 pm

Re: Unable to run check on non-child node. Revise your query

Post by jcwuerfl »

I still had a directory there w/o the mount being "mounted" there so was still working as it was check the root space as apposed to the /dbdata mount I believe.

Thanks!
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Unable to run check on non-child node. Revise your query

Post by bwallace »

Thanks for the update - are we good to lock this thread or do you prefer it be left open awhile longer?
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked