I have installed your check on my server, and it finds all disks and lists them in checkmk. To make sure it works, I connected a disk with SMART errors to a device and tested the script again, it still reports the disk to be fine.
I am managing linux servers too, and these use smartmontools which works fine. you can have smartmontools on windows x64 too, https://sourceforge.net/projects/smartmontools/ has a precompiled version.
My knowledge in powershell scripting is really small, is it possible to adopt the smart script from linux clients to windows and powershell? We would be able to see much more details about the disks.
Thank you for the scripts, they are a good starting point!
I’m not 100% sure, but I guess when in an S2D Environment the additional smartmonitor won’t work. The Get-Physicaldisk cmdlet should report disk issues when appearing - but i’m not sure if they are watching the smart counters the same as traditional tools.
For example: In Server 2019 they detect disk issues by comparing the disk latency against other disks from the same type of the server.
I found out that the powershell version without smartmontools is not working the hard way, because we had a failing disk in a multi disk raid system, smart reported pending sectors but powershell reported no errors.
I don’t want to wait until the disk is totally gone, I want to swap and recover on the first sign of upcoming trouble.
To test this, I got a disk with SMART errors just for testing in my machine, and powershell thinks it is fine…