What's Changed
Added query command to check_nsclient command and attached client only binaries to release.
This means you can now inventory queries (check_commands):
check_nsclient nsclient --insecure --password PASSWORD queries list
╭───────────────────────┬──────────────╮
│ title │ plugin │
├───────────────────────┼──────────────┤
│ check_always_critical │ CheckHelpers │
│ check_always_ok │ CheckHelpers │
│ check_always_warning │ CheckHelpers │
│ check_and_forward │ CheckHelpers │
╰───────────────────────┴──────────────╯
As well as execute queries:
check_nsclient nsclient --insecure --password PASSWORD queries execute check_memory
╭─────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ command │ check_memory │
│ output │ OK: committed: 36.009GB/68.483GB, physical: 30.276GB/63.733GB │
│ committed │ 36.008548736572266GB, warning: 54.78678588848561, critical: 61.635134124197066, minimum: 0, maximum: 68.48348236083984 │
│ physical % │ 48%, warning: 80, critical: 90, minimum: 0, maximum: 100 │
│ committed % │ 53%, warning: 80, critical: 90, minimum: 0, maximum: 100 │
│ physical │ 30.27570343017578GB, warning: 50.986785888671875, critical: 57.36013412475586, minimum: 0, maximum: 63.73348236083984 │
│ result │ OK │
╰─────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
As with most commands you can get output as json:
check_nsclient --output json nsclient --insecure --password PASSWORD queries execute check_cpu
{
"command": "check_cpu",
"lines": [
{
"message": "OK: CPU load is ok.",
"perf": {
"total 1m": {
"value": 20.0,
"unit": "%",
"warning": 80.0,
"critical": 90.0,
"minimum": null,
"maximum": null
},
"total 5s": {
"value": 23.0,
"unit": "%",
"warning": 80.0,
"critical": 90.0,
"minimum": null,
"maximum": null
},
"total 5m": {
"value": 21.0,
"unit": "%",
"warning": 80.0,
"critical": 90.0,
"minimum": null,
"maximum": null
}
}
}
],
"result": 0
}
As well as in the nagios format:
check_nsclient nsclient --insecure --password PASSWORD queries execute-nagios check_cpu
OK: CPU load is ok.|'total 5m'=22%;80;90 'total 1m'=21%;80;90 'total 5s'=22%;80;90
Full Changelog: 0.11.0...0.11.1