"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.
User avatar
CatalystX
Posts: 12
Joined: Tue Mar 31, 2015 2:03 pm

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

Post by CatalystX »

We have a single server where we have multiple checks like:

Code: Select all

define service {
        host_name                       some.host.tld
        service_description             Disk Usage on _boot
        use                             xiwizard_ncpa_service
        check_command                   check_xi_ncpa_agent!-t 'mytoken' -P 5693 -M 'disk/logical/|boot/used_percent' -w 95 -c 98
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        contact_groups                  Team
        _xiwizard                       ncpa
        register                        1
        }

define service {
        host_name                       some.host.tld
        service_description             Disk Usage on _opt
        use                             xiwizard_ncpa_service
        check_command                   check_xi_ncpa_agent!-t 'mytoken' -P 5693 -M 'disk/logical/|opt/used_percent' -w 95 -c 98!!!!!!!
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        contact_groups                  Team
        _xiwizard                       ncpa
        register                        1
        }
The first four checks work perfectly fine (e.g., boot, above). The fifth and sixth checks result in:
Unable to run check on non-child node. Revise your query.
We're using NCPA 1.8.1, have restarted it and have uninstalled and reinstalled it to no avail. This configuration works everywhere but "this one" stubborn server, and I can't, for the life of me, figure out why. I've even copied existing configs in CCM to no avail, and if I Test the "working" versions from CCM, they result in the same error.

Any clues?
User avatar
CatalystX
Posts: 12
Joined: Tue Mar 31, 2015 2:03 pm

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

Post by CatalystX »

API call:
returns the expected:

Code: Select all

{
  "value": {
    "used_percent": [
      21.7, 
      "%"
    ]
  }
}
Manual run libexec:
./check_ncpa.py -H some.host.tld -t 'mytoken' -P 5693 -M 'disk/logical/|opt/used_percent' -w 95 -c 98 -sv
Returns:

Code: Select all

Connecting to: https://some.host.tld:5693/api/disk/logical/|opt/used_percent/?token=mytoken&warning=95&critical=98&check=1
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.
Last edited by CatalystX on Thu Jun 18, 2015 11:43 am, edited 1 time in total.
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 quer

Post by lmiltchev »

Can you go to "https://some.host.tld:5693/api/disk/" and show us everything you have on the page?

Also, run the following command from the CLI (not in the CCM!) and show us the output:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H <client ip> -t 'token' -P 5693 -M 'disk/logical/|boot/used_percent' -w 95 -c 98
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
CatalystX
Posts: 12
Joined: Tue Mar 31, 2015 2:03 pm

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

Post by CatalystX »

|boot works fine. API call to any of them works fine. Command line to anything else:

Code: Select all

Connecting to: https://some.host.tld:5693/api/disk/logical/|boot/used_percent/?token=mytoken&warning=95&critical=98&check=1
File returned contained:
{
  "value": {
    "returncode": 0,
    "stdout": "OK: used_percent was 25% | 'used_percent_0'=25%;95;98;"
  }
}
OK: used_percent was 25% | 'used_percent_0'=25%;95;98;
That's why this is ... crazy.

Let's change this up slightly --- I'm gonna ignore |opt right now as "file system/permissions corruption" and just move on. So ... |svn directory, instead of |opt. Same issues, although -M 'disk/logical/|svn/used_percent' works from the command line, from Test, yet still shows the same error in Service Problems (even after a forced check).

API disk logical:

Code: Select all

{
  "value": {
    "logical": {
      "|boot": {
        "total_size": [
          103512064, 
          "b"
        ], 
        "used_percent": [
          25.6, 
          "%"
        ], 
        "used": [
          26550272, 
          "b"
        ], 
        "free": [
          71617536, 
          "b"
        ], 
        "device_name": [
          [
            "/dev/sda1"
          ], 
          "name"
        ]
      }, 
      "|": {
        "total_size": [
          519933952, 
          "b"
        ], 
        "used_percent": [
          88.5, 
          "%"
        ], 
        "used": [
          460375040, 
          "b"
        ], 
        "free": [
          32715776, 
          "b"
        ], 
        "device_name": [
          [
            "/dev/mapper/VolGroup00-LogVol00"
          ], 
          "name"
        ]
      }, 
      "|svn": {
        "total_size": [
          21129457664, 
          "b"
        ], 
        "used_percent": [
          21.7, 
          "%"
        ], 
        "used": [
          4581187584, 
          "b"
        ], 
        "free": [
          15474950144, 
          "b"
        ], 
        "device_name": [
          [
            "/dev/mapper/VolGroup01-LogVol06"
          ], 
          "name"
        ]
      }
    }
  }
}
User avatar
CatalystX
Posts: 12
Joined: Tue Mar 31, 2015 2:03 pm

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

Post by CatalystX »

Code: Select all

./check_ncpa.py -H some.host.tld -t 'mytoken' -P 5693 -M 'disk/logical/|svn/used_percent' -w 95 -c 98 -sv

Connecting to: https://some.host.tld:5693/api/disk/logical/|svn/used_percent/?token=mytoken&warning=95&critical=98&check=1
File returned contained:
{
  "value": {
    "returncode": 0,
    "stdout": "OK: used_percent was 21% | 'used_percent_0'=21%;95;98;"
  }
}
OK: used_percent was 21% | 'used_percent_0'=21%;95;98;
"Test Command" works from CCM.

API works (of course, that works on all them anyway).

Check from Nagios?
Unable to run check on non-child node. Revise your query.
I note it's send "\|svn" when it checks. Tested with %7c from command line and API, and works fine ... Put into Nagios, same result.
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 quer

Post by lmiltchev »

Don't run the command in verbose mode. Just run it as such:

Code: Select all

./check_ncpa.py -H some.host.tld -t 'mytoken' -P 5693 -M 'disk/logical/|svn/used_percent' -w 95 -c 98
and show us the output.

Go to Home->Service Detail->click on the "problem" service->Configure->Re-configure this service, copy/paste the command that you see there.

Schedule a forced immediate check and show us a screenshot of what you see.

Also, run the following command and show us the output:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -V
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
CatalystX
Posts: 12
Joined: Tue Mar 31, 2015 2:03 pm

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

Post by CatalystX »

Umm ... Non-verbose is after the debug code already ... but ok.

Code: Select all

./check_ncpa.py -H some.host.tld -t 'mytoken' -P 5693 -M 'disk/logical/|svn/used_percent' -w 95 -c 98

OK: used_percent was 21% | 'used_percent_0'=21%;95;98;
From reconfigure.

Code: Select all

check_xi_ncpa_agent!-t 'mytoken' -P 5693 -M 'disk/logical/|svn/used_percent' -w 95 -c 98
From Version.

Code: Select all

check_ncpa.py, Version 0.3.5
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

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

Post by krobertson71 »

Hey this is Kris. I worked with the OP. I will be taking over. Will get you the data shortly.

Thanks.

Kris
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post by tmcdonald »

@CatalystX can we get confirmation that krobertson71 is working with you?
Former Nagios employee
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

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

Post by krobertson71 »

He is the newest member of our Middleware team and I am the project lead for this for our company. So yes you can.

Also how would I be able to get you the data you need if I didnt???
Locked