3/29/2018: Script that can be used to collect drive-failure errors out of HP Array Config Utility (via the CLI tool).
I'm in the process of migrating my firm's core mail assets to Exchange Online. But, in the interrum, I've still got some aging original hardware holding users. Which, naturally with increasing hours of uptime, sheds old drives on a regular basis.
I generally like to have SCOM watching & alerting on this type of material. But some of these systems run in locations that are somewhat 'adverse' to going deep on monitoring infrastructure and overhead.
So, when faced with a challenge, we roll up our sleeves and roll-our-own ad-hoc solutions to keep those old boys propped vertical, at least until I can finish draining the hosted users online. :D
The original concept at work was borrowed from ramazancan's CheckSmartArray() function, which leverages the HP Array Config Util CLI exe to dump status info into the pipeline, and then parse the text output for failure messages.
I originally started with his code, but later rewrote all but the command to execute the dump, and the text parser bits. And as long as I was in with access to Exchange Mgmt Shell, I added in code to determine the details on the database replica etc hosted on the drive, transcript out the material, and email alerts to appropriate admins.
And, more-importantly, I also implemented dupe-alert suppression by maintaining permanent semaphore veriables stored as files on the script drive. Letting the remote admin know he needs to change the drive out ASAP, _once_ is great. Letting him know every hour until he does, is a bit over the top. :P
Here's a Gist with the key chunks of code (see the full Git copy of the script for more details)
And the current revision can always be found at Github: check-DriveStatusHP.ps1