Page 1 of 1

check_ncpa.py system options

Posted: Tue Feb 23, 2021 1:29 pm
by seaward1983
OS - Linux RHEL 7
NagiosXI - 5.8.1

First and foremost - and please understand I did Google the heck out of it, as well as reviewed a number of support docs - I just may not know the correct verbiage to place in my queries.

How do I find out all of the syntax options for check_ncpa.py? For example,
./check_ncpa.py -H xxxx -t xxx -M system/time - produces the time
./check_ncpa.py -H xxxx -t xxx -M system/version - produces the version on Windows hosts, but on Linux hosts - not sure what it's reporting back (OK: Version was ['#1 SMP Mon Nov 30 13:05:31 EST 2020']) - cannot translate.

a) for 'system' - what are all the options I can select from? time? version? uptime? - is there a list somewhere? Or how is it calculated?
b) is there a centralized library that has information for all of the files in the /usr/local/nagios/libexec?

Re: check_ncpa.py system options

Posted: Wed Feb 24, 2021 11:21 am
by benjaminsmith
Hi @seaward1983,

That endpoint is available for basic system info was not created for running checks against. You can view full output from the GUI.
"system": {
"node": "DESKTOP-OUK3A89",
"machine": "AMD64",
"uptime": [
782587.5349552631,
"s"
],
"version": "10.0.19041",
"time": 1614183498.368,
"release": "10",
"timezone": [
"Central Standard Time",
"Central Daylight Time"
],
"agent_version": "2.2.2",
"system": "Windows",
"processor": "Intel64 Family 6 Model 158 Stepping 13, GenuineIntel"
}
}
All the API documentation is available on the following page.

https://www.nagios.org/ncpa/help.php#api-modules-system

Hope that helps answer your question. Let me know if you need clarification on anything.

--Benjamin