NCPA.py wizard and check errors
Posted: Fri Oct 24, 2014 12:32 pm
I know in 1.7 the api calls changed a bit. When I try to use these new calls in Nagios Xi for a service check I get the following error:
I run the command, it shows the [1] and [2] and then throws the error then just sits there. when I hit enter you see the Exit 3 and Done status, which is weird.
Here is how I am trying to set up the check in Nagios XI: Arg 1:
When I go to configure the check is Core Configuration manager in the Nagios XI gui and run "test check" against a host this is returned
As you can see it dosen't even take the full command ARG1.
This host is running the NCPA1.7.2 agent.. Server is NagiosXIR1.5.
I am thinking maybe I need to update the ncpa.py check with a newer version?
On the host itself, when I check the agent api directly this works great.
Any help here will go a long way towards my production implementation.
Code: Select all
[nagios@nagiast01 libexec]$ ./check_ncpa.py -H emovasd01 -P 5693 -t mytoken -M services?service=employeemove&status=running&check=true
[1] 32420
[2] 32421
[nagios@nagiast01 libexec]$ UNKNOWN: Error occurred while running the plugin.
[1]- Exit 3 ./check_ncpa.py -H emovasd01 -P 5693 -t mytoken -M services?service=employeemove
[2]+ Done status=running
Here is how I am trying to set up the check in Nagios XI: Arg 1:
Code: Select all
-t 'mytoken' -P 5693 -M 'services?service=employeemove&status=running&check=true'Code: Select all
COMMAND: /usr/local/nagios/libexec/check_ncpa.py -H emovasd01 -t 'mytoken' -P 5693 -M \'services\?service=employeemove
OUTPUT: UNKNOWN: Error occurred while running the plugin.This host is running the NCPA1.7.2 agent.. Server is NagiosXIR1.5.
I am thinking maybe I need to update the ncpa.py check with a newer version?
On the host itself, when I check the agent api directly this works great.
Code: Select all
https://emovasd01:5693/api/services?service=employeemove&status=running&check=true
{
"value": {
"returncode": 2,
"stdout": "CRITICAL: Service employeemove is stopped"
}
}