nrpe when host is down and accepting command line arguments
Posted: Mon May 08, 2017 10:05 pm
I have a remote host that accepts command line arguments from a remote server.
For example, I have a custom command called check_storage_devices and I pass in the name of a disk, say vda4 or vda5. The remote host then checks if there is a disk called vda4 or vda5 on it by running the check_storage_devices command installed on the remote host.
However I noticed that if I want it to be a service, I define the command in the commands.cfg as something like this:
Which means that it runs the check_storage_devices that belongs to the remote host, and in my service I simply define the check command as
However, when the remote host goes down, I constantly get logs like this:
Probably because the host is down there isn't any way for the service to know. But isn't the service checking nrpe first and shouldn't the result of that trigger some kind of case where since NRPE isn't reachable that the check command isn't run? How do people usually handle these cases? If you need any more concise / specific configurations let me know. Thanks.
For example, I have a custom command called check_storage_devices and I pass in the name of a disk, say vda4 or vda5. The remote host then checks if there is a disk called vda4 or vda5 on it by running the check_storage_devices command installed on the remote host.
However I noticed that if I want it to be a service, I define the command in the commands.cfg as something like this:
Code: Select all
command check_storage_devices {
$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_storage_devices -a $ARG1$
Code: Select all
define service {
...
check_command check_storage_devices!vda5
Code: Select all
Return code of 255 for check of service 'check_storage_devices' on host 'storage-test-instance' was out of bounds.