When I try to configure a command/service using check_uptime with arguments, it errors in Nagios as "Unknown command(s): check_uptime -a 'warn= uptime > 27d'" and using nscp test on the target server while it does this I can see "E core Unknown command(s): check_uptime -a 'warn= > 27d' available commands: commands {, check_counter, check_cpu, check_memory, check_network, check_os_version, check_pagefile, check_pdh, check_process, check_service, check_uptime, checkcounter, checkcpu, checkmem, checkprocstate, checkservicestate, check_uptime}, plugins {, 0} c:\source\master\service\plugin_manager.cpp:475"
This is with the following command and service defined:
Code: Select all
define command{
command_name check_nrpe_uptime
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_uptime -a 'warn= uptime > 27d'"
}
Code: Select all
define service{
service_description Uptime
host_name server01
check_command check_nrpe_uptime
use generic-service
}
If I amend the command to remove everything after "check_uptime" it works (but obviously without the thresholds I want).
If I run the following command from the Nagios server it returns successfully:
Code: Select all
[root@nagios01 nagios]# /usr/lib64/nagios/plugins/check_nrpe -H server -c check_uptime -a "warn=uptime > 27d"
OK: uptime: 1d 06:5h, boot: 2019-02-06 10:12:17 (UTC)|'uptime'=108347s;2332800;86400