I suspect a coding problem with regard to NCPA Active checks calling the API against the System. Please observe the following calls, results and ncpa_listener.log
Note the "for i" loop
Code: Select all
$ for i in node uptime system machine version time release timezone processor agent_version
> do
> /usr/local/nagios/libexec/check_ncpa.py -H 128.208.215.20 -P 3181 -t myTokenName -M "system/${i}" -v
> doneCode: Select all
Connecting to: https://128.208.215.20:3181/api/system/node/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Node was ['dcom-nagiosxi-p1.mcis.washington.edu']"
}
OK: Node was ['dcom-nagiosxi-p1.mcis.washington.edu']
Connecting to: https://128.208.215.20:3181/api/system/uptime/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Uptime was 409 days 18 hours 35 minutes 45 seconds | 'uptime'=35404545.00s;;;"
}
OK: Uptime was 409 days 18 hours 35 minutes 45 seconds | 'uptime'=35404545.00s;;;
Connecting to: https://128.208.215.20:3181/api/system/system/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: System was ['Linux']"
}
OK: System was ['Linux']
Connecting to: https://128.208.215.20:3181/api/system/machine/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Machine was ['x86_64']"
}
OK: Machine was ['x86_64']
Connecting to: https://128.208.215.20:3181/api/system/version/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Version was ['#1 SMP Thu Aug 3 08:15:31 EDT 2017']"
}
OK: Version was ['#1 SMP Thu Aug 3 08:15:31 EDT 2017']
Connecting to: https://128.208.215.20:3181/api/system/time/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Time was 1540567799.24 | 'time'=1540567799.24;;;"
}
OK: Time was 1540567799.24 | 'time'=1540567799.24;;;
Connecting to: https://128.208.215.20:3181/api/system/release/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Release was ['3.10.0-693.1.1.el7.x86_64']"
}
OK: Release was ['3.10.0-693.1.1.el7.x86_64']
Connecting to: https://128.208.215.20:3181/api/system/timezone/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Timezone was ('PST', 'PDT')"
}
OK: Timezone was ('PST', 'PDT')
Connecting to: https://128.208.215.20:3181/api/system/processor/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Processor was ['x86_64']"
}
OK: Processor was ['x86_64']
Connecting to: https://128.208.215.20:3181/api/system/agent_version/?token=myTokenName&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Agent_version was ['2.1.5']"
}
OK: Agent_version was ['2.1.5']Code: Select all
2018-10-26 08:29:58,340 22701 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:29:58,346 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:58] "GET /api/system/node/?token=myTokenName&check=1 HTTP/1.1" 200 235 0.012732
2018-10-26 08:29:58,528 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:58] "GET /api/system/uptime/?token=myTokenName&check=1 HTTP/1.1" 200 264 0.018365
2018-10-26 08:29:58,706 22701 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:29:58,713 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:58] "GET /api/system/system/?token=myTokenName&check=1 HTTP/1.1" 200 206 0.016014
2018-10-26 08:29:58,883 22701 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:29:58,889 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:58] "GET /api/system/machine/?token=myTokenName&check=1 HTTP/1.1" 200 208 0.011424
2018-10-26 08:29:59,059 22701 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:29:59,065 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:59] "GET /api/system/version/?token=myTokenName&check=1 HTTP/1.1" 200 236 0.011403
2018-10-26 08:29:59,242 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:59] "GET /api/system/time/?token=myTokenName&check=1 HTTP/1.1" 200 234 0.013347
2018-10-26 08:29:59,406 22701 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:29:59,412 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:59] "GET /api/system/release/?token=myTokenName&check=1 HTTP/1.1" 200 227 0.009685
2018-10-26 08:29:59,582 22701 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:29:59,588 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:59] "GET /api/system/timezone/?token=myTokenName&check=1 HTTP/1.1" 200 213 0.011794
2018-10-26 08:29:59,762 22701 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:29:59,773 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:59] "GET /api/system/processor/?token=myTokenName&check=1 HTTP/1.1" 200 210 0.016912
2018-10-26 08:29:59,955 22701 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:29:59,961 22701 INFO 172.16.97.10 - - [2018-10-26 08:29:59] "GET /api/system/agent_version/?token=myTokenName&check=1 HTTP/1.1" 200 213 0.015778
So my assumption here is that we should therefore pass additional switch to modify that query argument as described in the documentation so for example I modify accordingly and pass the following command.
Code: Select all
$ /usr/local/nagios/libexec/check_ncpa.py -H 128.208.215.20 -P 3181 -t myTokenName -M 'system/agent_version' -v -q "check=0"Code: Select all
2018-10-26 08:53:01,578 3343 INFO Did not receive normal values. Unable to find meaningful check.
2018-10-26 08:53:01,582 3343 INFO 172.16.97.10 - - [2018-10-26 08:53:01] "GET /api/system/agent_version/?token=myTokenName&check=1&check=0 HTTP/1.1" 200 234 0.008094
So what does all of this mean? Not sure but I can see from my testing the the uptime and time API nodes do not send that message.
Maybe this is all insignificant in terms of the actual values being return but it still shows some type of coding issue unless this message is merely indicating that there is no way of using a threshold against it?
I guess you guys probably hate seeing my topics but I am really trying to understand some of the different aspects of the NCPA and how it operates...much of the documentation lacks specifics and this helps me and I hope others understand the quirks of its operation.
Please let me know what you think and as always many thanks for your help,
Danny