Check for Missing Drive

(Oliver Tatzmann) #1

Hi,
what’s the correct way to tell “check_drivesize” that it’s NOT OK that a drive is missing e.g.:
/check_nrpe -H server -c check_drivesize -a “filter=drive in (‘X:\’)” ‘crit=free<99%’ ‘warn=free<99%’
OK: No drives found

Expection --> Critical: No drives found ( exit with 2)

The goal is to have a list of drives (e.g.: L:\,M:\,P:\;X:\) and if one “gets lost” I need to trigger an alert

thanks
Oliver

(Oliver Tatzmann) #2

Specifing the drive serperatly brings at least an error message …
-c check_drivesize -a drive=c drive=f drive=x ‘crit=free<5%’ ‘warn=free<10%’
Filter processing failed: Failed to get size for x:: 3: The system cannot find the path specified.

but “drive=c drive=f drive=x” is not pretty when used as a custom host variable, if you have several drives to check