I'm trying to monitor the health of our Storage Spaces Direct virtual disks using PowerShell with XML/Custom Advanced senor, with something like this:
$GVD = Get-VirtualDisk | Where-Object HealthStatus -ne Healthy Write-Host "<prtg>" Write-Host "<result>" "<channel>Get-VirtualDisk</channel>" "<value>"+ $GVD.FriendlyName +"</value>" "</result>"
I basically want to be alerted when one (ideally it should output which, using FriendlyName) virtual disk is not Healthy.
What I have runs, but the value is always 0 and I can't make it to work.
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.