Skip to content

Commit

Permalink
Merge pull request #103 from NETWAYS/add_hotspare_mode
Browse files Browse the repository at this point in the history
Add hotspare mode
  • Loading branch information
RincewindsHat authored Oct 10, 2024
2 parents 70de07f + 887eaae commit 26b3294
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hp/drive/drive.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (d *PhysicalDrive) GetNagiosStatus() (int, string) {
description := fmt.Sprintf("physical drive (%-4s) model=%s serial=%s firmware=%s hours=%d",
d.ID, d.Model, d.Serial, d.FwRev, d.Hours)

if d.Status != "ok" {
if d.Status != "ok" && d.Status != "hotspare" {
return check.Critical, description + " - status: " + d.Status
}

Expand Down
9 changes: 5 additions & 4 deletions hp/mib/cpq_da_phy_drv.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ const (
)

var CpqDaPhyDrvStatusMap = StringMap{
1: "other",
2: "ok",
3: "failed",
4: "predictiveFailure",
1: "other",
2: "ok",
3: "failed",
4: "predictiveFailure",
10: "hotspare",
}

0 comments on commit 26b3294

Please sign in to comment.