Check_disk windows - specific drive present critical vs unknown

Hi everybody

(hi dr nick etc…)

I am using check_disk windows check and specifying a path of for example Z: as the drive drops sometimes after restarting. When Z: is not found it gives an UNKNOWN error which I can turn into a notification but is there any way I can make the check enter into a critical state if it doesn’t find the Z: drive rather than an UNKNOWN state?

IMHO, a disk usage check plugin should return UKNOWN if a disk cannot be found - simply because it doesn’t know what to do, and such a check usually alerts about usage.

We do the same thing in https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/disk-usage (if you want to have a look).