check_ncpa.py UNKNOWN error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

check_ncpa.py UNKNOWN error

Post by BanditBBS »

Running some tests and installed NCPA on my desktop. Ran a check against it and get the desired result, but also get an UNKNOWN after that.

Code: Select all

[nagios@iss-chi-nag05 libexec]$ ./check_ncpa.py -H 172.16.245.144 -t blah -M cpu/percent -w 60 -c 80
OK: Percent was 31.3%,0.0%,4.8%,0.0%,18.8%,0.0%,0.0%,3.2%|'percent_0'=31.3%;60;80 'percent_1'=0.0%;60;80 'percent_2'=4.8%;60;80 'percent_3'=0.0%;60;80 'percent_4'=18.8%;60;80 'percent_5'=0.0%;60;80 'percent_6'=0.0%;60;80 'percent_7'=3.2%;60;80
UNKNOWN: Error occurred while running the plugin.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_ncpa.py UNKNOWN error

Post by slansing »

Do you have anything regarding this in the ncpa logs on your local desktop? The listener.log is where the information should be, if anywhere. That is in the var directory under your installation path.

Have you been seeing this unknown on all of the checks you run to it? Or just this one for some odd reason?

What version of NCPA are you running? And what version of Windows? Any non default NCPA configuration changes?
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_ncpa.py UNKNOWN error

Post by BanditBBS »

Here is the log entries:

Code: Select all

DEBUG:root:Accessing internal API with accessor cpu/percent?token=test&check=1
DEBUG:root:Accessor result!
DEBUG:root:Accessing internal API with accessor cpu/percent
DEBUG:root:Using 
INFO:werkzeug:10.160.1.18 - - [23/Jul/2014 11:16:58] "GET /api/cpu/percent?token=test&check=1 HTTP/1.0" 200 -
DEBUG:root:Accessing internal API with accessor user/count?token=test&check=1
DEBUG:root:Accessor result!
DEBUG:root:Accessing internal API with accessor user/count
DEBUG:root:Using 
INFO:werkzeug:10.160.1.18 - - [23/Jul/2014 11:17:18] "GET /api/user/count?token=test&check=1 HTTP/1.0" 200 -
Nothing special about the install at all. Just downloaded from the exchange and installed. According the localhost:5693 I am running 1.4. I am getting it on all checks it seems. Windows 7 Pro 64-bit
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_ncpa.py UNKNOWN error

Post by lmiltchev »

I am also using ncpa 1.4 on Windows 7 Pro 64-bit but I am not seeing this error. It is possible though, this is a bug. I noticed a different bug - if you try to access the API by entering in the browser's address bar:

Code: Select all

https://ipaddress:5693/api/
you get an error:

Code: Select all

{
  "error": "Referencing node that does not exist."
}
but if you want to view a particular metric, you can...

Code: Select all

https://ipaddress:5693/api/cpu/percent

Code: Select all

{
  "value": {
    "percent": [
      [
        15.2, 
        0.0, 
        6.7, 
        0.0, 
        12.5, 
        0.0, 
        1.8, 
        12.5
      ], 
      "%"
    ]
  }
}
I am not sure if we are going to do lots of digging into this as most of the bugs *should* be fixed in the newer revisions. We are going to be releasing NCPA ver. 1.7 very soon (probably in a couple of days).
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_ncpa.py UNKNOWN error

Post by BanditBBS »

Roger that. I'll keep an eye on FB, Twitter, Nagios site for the news of 1.7 being released. I can wait a few days...hopefully that comes true :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_ncpa.py UNKNOWN error

Post by lmiltchev »

Actually, we are working on it as we speak. I will be testing it (probably sometime today) and will let you know when it is ready for download. :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_ncpa.py UNKNOWN error

Post by BanditBBS »

I'm still getting the error and I added on the -v option, here is the output.

Code: Select all

[nagios@iss-chi-nag05 libexec]$ ./check_ncpa.py -H 172.16.245.105 -t test -M cpu/percent
OK: percent was 0%,0%,0%,15%,16%,0%,18%,0% | 'percent_0'=0%;;; 'percent_1'=0%;;; 'percent_2'=0%;;; 'percent_3'=15%;;; 'percent_4'=16%;;; 'percent_5'=0%;;; 'percent_6'=18%;;; 'percent_7'=0%;;;
UNKNOWN: Error occurred while running the plugin.

Code: Select all

[nagios@iss-chi-nag05 libexec]$ ./check_ncpa.py -H 172.16.245.105 -t test -M cpu/percent -v
Could not complete with SSL, or there was an error in the JSON
OK: percent was 0%,13%,0%,17%,20%,0%,8%,0% | 'percent_0'=0%;;; 'percent_1'=13%;;; 'percent_2'=0%;;; 'percent_3'=17%;;; 'percent_4'=20%;;; 'percent_5'=0%;;; 'percent_6'=8%;;; 'percent_7'=0%;;;
<type 'int'>
And error was encountered:
0
Also, the log is no longer being written to with the new version.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_ncpa.py UNKNOWN error

Post by sreinhardt »

I'm not seeing these errors in either the client or server code, but don't have ncpa installed currently to test with. I'll install on my windows systems and have a go here in a bit, I have a few thoughts on where to look.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_ncpa.py UNKNOWN error

Post by BanditBBS »

Spenser,

Any update on this? I need to decide on a windows agent like last week :) lol
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_ncpa.py UNKNOWN error

Post by sreinhardt »

I am able to confirm that I get the same error, but I have yet to find a resolution for you, still testing it now.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked