Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
$USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckDriveSize -a MinWarnFree=10% MinCritFree=5% Drive=E
What has happened now is that we had a SAN issue that disconnected that volume, bringing down a bunch of our SQL resources. Nagios ignored it, as CheckDriveSize seems to report these as 'UNKNOWN'. Can this be configured to be treated as critical?
Somewhere on the client there needs to be a configuration file that tells NRPE what UNIX command(s) to execute when it is told to execute NRPE command "CheckDriveSize." Unfortunately, I do not recognize the format of the file you listed below, so I don't know where that is. Find it and try to find the line that talks about CheckDriveSize.
The command works fine for any parameters that don't consist of a string, so I know the command is working in general. That's a standard NSClient++ config file.
The scenario doesn't sound wrong to me - you can't check drive size on a drive if the drive is not known. So, the check *should* come back as unknown. If you want notifications for a service in an unknown state, you need to set it with 'notification_options' for the service definition. It wouldn't surprise me if you have your notification options set to just 'w,c,r' for warning, critical recovery. You probably want w,c,r,u to get unknown alerts too. Quick excerpt on 'notification_options' from the service definition section of http://nagios.sourceforge.net/docs/3_0/ ... ml#service (emphasis mine) :
This directive is used to determine when notifications for the service should be sent out. Valid options are a combination of one or more of the following: w = send notifications on a WARNING state, u = send notifications on an UNKNOWN state, c = send notifications on a CRITICAL state, r = send notifications on recoveries (OK state), f = send notifications when the service starts and stops flapping, and s = send notifications when scheduled downtime starts and ends. If you specify n (none) as an option, no service notifications will be sent out. If you do not specify any notification options, Nagios will assume that you want notifications to be sent out for all possible states. Example: If you specify w,r in this field, notifications will only be sent out when the service goes into a WARNING state and when it recovers from a WARNING state.
define service {
use sometemplate_services
host_name someservername
check_command check_nrpe_yourcustomcommandname!awesomeargument1
service_description NRPE-disk-withcheese
notification_options w,c,r,u #note, this would override a notification_options defined in the sometemplate_services defined in the 'use' line above
}