This is a strange issue, maybe related to the way the nagios process is dealing with the server's pipes and check_command invoking.
A check_nrpe based probe is being given the OK status by nagios while it should be CRITICAL.
The output is as it should, but the status is wrongly OK (check attached image).
I also add the service and command definitions as well as the output from the CLI along with return code echoed to screen
Code: Select all
## service.cfg
define service{
use my-generic-service,srv-pnp
host_name ODIN
service_description Drive_C
servicegroups ERP,todos,E-Mail,Domain
check_command check_nrpe!CheckDriveSize -a ShowAll MaxWarnUsed=90% MaxCritUsed=95% Drive='C'
}
## command.cfg
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
## CLI output and return code
$> ./check_nrpe -H odin -c CheckDriveSize -a ShowAll MaxWarnUsed=90% MaxCritUsed=95% Drive='C'
CRITICAL: C:: Total: 19.5G - Used: 18.7G (95%) - Free: 860M (5%) > critical|'C: %'=95%;90;95 'C:'=18.69GB;17.58;18.56;0;19.53
$> echo $?
2
The server is a virtualized Ubuntu Server 12.04 LTS, the nagios is v3.4.1 and the check_nrpe plugin is v2.12.
Thank you for your time and effort.
Best regards,
sebastiaopburnay.