Skip to content

Commit a31aab6

Browse files
authored
Enhance HP Smart Array error detection and logging
1 parent ee9df14 commit a31aab6

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

script/storage_health.ps1

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Written by Orsiris de Jong - NetInvent
66
#
77
# Changelog
8-
# 2026-01-13: Add HP Smart Array Event Service error detection
8+
# 2026-01-13: Add HP Smart Array Event Service error detection (Gen9 & Gen10 tested)
99
# 2024-10-28: Add uniqueid to disks since disk serial numbers might not exist in virtual machines
1010
# 2024-04-05: Initial version
1111
#
@@ -128,7 +128,16 @@ function GetVirtualDiskStatus {
128128

129129
function GetHPSmartArrayStatus {
130130
# We need to check whether Cissesrv exists
131+
$service = $False
132+
# HP Smart Array SAS/SATA Event Notification Service (Gen9)
131133
if (Get-Service "cissesrv" -ErrorAction SilentlyContinue) {
134+
$service = "cissesrv"
135+
}
136+
# HPE Smart Array SR Event Notification Service (Gen10)
137+
if (Get-Service "HpePqiESrv" -ErrorAction SilentlyContinue) {
138+
$service = "HpePqiESrv"
139+
}
140+
if ($service) {
132141
# If an error is found, we'll keep the textcollector file around until it is manually deleted by a sysadmin
133142
$prometheus_status = "#HELP windows_hpe_smart_array_health_status '1' if array has errors`n"
134143

@@ -138,7 +147,7 @@ function GetHPSmartArrayStatus {
138147
$prometheus_status += "windows_hpe_smart_array_health_status{} 1`n"
139148
} else {
140149
$prometheus_status += "windows_hpe_smart_array_health_status{} 0`n"
141-
}
150+
}a
142151
return $prometheus_status
143152
} else {
144153
return ""

0 commit comments

Comments
 (0)