Page 1 of 1

check_ncpa.py UNKNOWN error

Posted: Tue Jul 22, 2014 11:35 am
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.

Re: check_ncpa.py UNKNOWN error

Posted: Wed Jul 23, 2014 9:55 am
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?

Re: check_ncpa.py UNKNOWN error

Posted: Wed Jul 23, 2014 10:19 am
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

Re: check_ncpa.py UNKNOWN error

Posted: Wed Jul 23, 2014 1:08 pm
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).

Re: check_ncpa.py UNKNOWN error

Posted: Wed Jul 23, 2014 1:16 pm
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 :)

Re: check_ncpa.py UNKNOWN error

Posted: Wed Jul 23, 2014 2:42 pm
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. :)

Re: check_ncpa.py UNKNOWN error

Posted: Mon Jul 28, 2014 8:36 am
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.

Re: check_ncpa.py UNKNOWN error

Posted: Mon Jul 28, 2014 3:03 pm
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.

Re: check_ncpa.py UNKNOWN error

Posted: Wed Jul 30, 2014 8:41 am
by BanditBBS
Spenser,

Any update on this? I need to decide on a windows agent like last week :) lol

Re: check_ncpa.py UNKNOWN error

Posted: Wed Jul 30, 2014 2:28 pm
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.