Monitoring an HP Smart Storage Array

Using the Check a Console Command task it is possible to scan the output of a vendor supplied command-line utility for potential alert conditions. This guide describes regular checks on the health of an HP Smart Storage RAID array using the HPSSACLI utility.

DISCLAIMER: The information provided herein is intended as an example only. No representation is made as to its accuracy, completeness or suitability for a particular purpose or platform (see also the Winserver Wingman EULA). Please test your own implementation thoroughly in the specific environment within which it need function and ensure that it operates as required.

Tested On: Windows Server 2008 with P212 SATA RAID Controller (HP ProLiant M110 G6)

Command Line

Consult accompanying documentation, the vendor's website or any help text available from the utility itself to determine an appropriate command line to execute. In this case we need only append the parameters ctrl slot=0 show config to produce a useful summary which should highlight any problems on the specified controller.

Open a DOS window 'as Administrator' and pipe the output of this command to a text file;

"C:\Program Files\HP\hpssacli.exe" ctrl slot=0 show config > C:\RAID.txt

Which will create a file that includes something like the following;

Smart Array P212 in Slot 0 (Embedded)     (sn: PACCP9SYUY4S  )
   Port Name: 1I
   Port Name: 2E
   array A (SATA, Unused Space: 0  MB)
      logicaldrive 1 (232.9 GB, RAID 1, OK)
      physicaldrive 1I:0:1 (port 1I:box 0:bay 1, SATA, 250 GB, OK)
      physicaldrive 1I:0:2 (port 1I:box 0:bay 2, SATA, 250 GB, OK)
   array B (SATA, Unused Space: 0  MB)
      logicaldrive 2 (1.8 TB, RAID 1, OK)
      physicaldrive 1I:0:3 (port 1I:box 0:bay 3, SATA, 2 TB, OK)
      physicaldrive 1I:0:4 (port 1I:box 0:bay 4, SATA, 2 TB, OK)

Task Configuration

The output above is problematic in that the line ending we need scan for, "OK)", appears multiple times, once for each logical drive and then again for each constituent physical drive. A simple text search will not suffice as it might be successfully matched even while one of the components is reporting an issue.

Instead we'll utilise regular-expression matching to ensure that;

a) At least one line includes the text "drive" and ends with "OK)" (confirming the output is valid) and;

b) Nowhere does a line that includes the text "drive" end with anything other than "OK)";

Check the RAID controller status summary each hour.

Task Parameters

Task Type: Check a Console Command

Frequency: 1 Hour

Execute: C:\Program Files\HP\HPSSACLI.exe

Arguments: ctrl slot=0 show config

CAUTION On: (command) ...does not run or its output; does not match the expression; drive.*OK\)$

FAILURE On: (command) ...runs and its output; matches the expression; drive.*(?<!OK)\)$

25 February 2017