Skip to content

Commit

Permalink
ProLiant: Show detailed power supply status/condition if not ok
Browse files Browse the repository at this point in the history
cpqHeFltTolPowerSupplyCondition can only have the following values:
other(1), ok(2), degraded(3), failed(4).

However if something isn't OK, show more detailed information based on
cpqHeFltTolPowerSupplyErrorCondition and cpqHeFltTolPowerSupplyStatus.

This helps (a human) to more easily determine the required action since
i.e. the error condition powerinputloss doesn't require the replacement
of a power supply whereas a fan failure usually means that the PSU needs
replacing since they aren't replaceable parts within most HPE PSUs.

Change tested with following ProLiant servers:
- HPE ProLiant DL380 G6:    iLO3, CentOS 6 with Net-SNMP & hp-snmp-agents
- HPE ProLiant DL360p Gen8: iLO4, agentless
- HPE ProLiant DL360 Gen9:  iLO4, agentless
  • Loading branch information
Mathieu Simon committed Dec 2, 2017
1 parent 766cb50 commit 4670d56
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
13 changes: 10 additions & 3 deletions plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ sub new {
cpqHeFltTolPowerSupplyBay => $params{cpqHeFltTolPowerSupplyBay},
cpqHeFltTolPowerSupplyPresent => $params{cpqHeFltTolPowerSupplyPresent},
cpqHeFltTolPowerSupplyCondition => $params{cpqHeFltTolPowerSupplyCondition},
cpqHeFltTolPowerSupplyStatus => $params{cpqHeFltTolPowerSupplyStatus},
cpqHeFltTolPowerSupplyErrorCondition => $params{cpqHeFltTolPowerSupplyErrorCondition},
cpqHeFltTolPowerSupplyRedundant => $params{cpqHeFltTolPowerSupplyRedundant},
cpqHeFltTolPowerSupplyCapacityUsed => $params{cpqHeFltTolPowerSupplyCapacityUsed} || 0,
cpqHeFltTolPowerSupplyCapacityMaximum => $params{cpqHeFltTolPowerSupplyCapacityMaximum} || 0,
Expand All @@ -86,9 +88,11 @@ sub check {
$self->add_info(sprintf "powersupply %d is missing",
$self->{cpqHeFltTolPowerSupplyBay});
} else {
$self->add_info(sprintf "powersupply %d needs attention (%s)",
$self->add_info(sprintf "powersupply %d needs attention (overall: %s, status: %s, error cond.: %s)",
$self->{cpqHeFltTolPowerSupplyBay},
$self->{cpqHeFltTolPowerSupplyCondition});
$self->{cpqHeFltTolPowerSupplyCondition},
$self->{cpqHeFltTolPowerSupplyStatus},
$self->{cpqHeFltTolPowerSupplyErrorCondition});
}
$self->add_message(CRITICAL, $self->{info});
} else {
Expand All @@ -98,7 +102,9 @@ sub check {
}
$self->add_extendedinfo(sprintf "ps_%s=%s",
$self->{cpqHeFltTolPowerSupplyBay},
$self->{cpqHeFltTolPowerSupplyCondition});
$self->{cpqHeFltTolPowerSupplyCondition},
$self->{cpqHeFltTolPowerSupplyStatus},
$self->{cpqHeFltTolPowerSupplyErrorCondition});
if ($self->{cpqHeFltTolPowerSupplyCapacityUsed} &&
$self->{cpqHeFltTolPowerSupplyCapacityMaximum}) {
if ($self->{runtime}->{options}->{perfdata}) {
Expand Down Expand Up @@ -133,6 +139,7 @@ sub dump {
printf "[PS_%s]\n", $self->{cpqHeFltTolPowerSupplyBay};
foreach (qw(cpqHeFltTolPowerSupplyBay cpqHeFltTolPowerSupplyChassis
cpqHeFltTolPowerSupplyPresent cpqHeFltTolPowerSupplyCondition
cpqHeFltTolPowerSupplyStatus cpqHeFltTolPowerSupplyErrorCondition
cpqHeFltTolPowerSupplyRedundant cpqHeFltTolPowerSupplyCapacityUsed
cpqHeFltTolPowerSupplyCapacityMaximum)) {
printf "%s: %s\n", $_, $self->{$_};
Expand Down
38 changes: 38 additions & 0 deletions plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ sub init {
cpqHeFltTolPowerSupplyBay => "1.3.6.1.4.1.232.6.2.9.3.1.2",
cpqHeFltTolPowerSupplyPresent => "1.3.6.1.4.1.232.6.2.9.3.1.3",
cpqHeFltTolPowerSupplyCondition => "1.3.6.1.4.1.232.6.2.9.3.1.4",
cpqHeFltTolPowerSupplyStatus => "1.3.6.1.4.1.232.6.2.9.3.1.5",
cpqHeFltTolPowerSupplyErrorCondition => "1.3.6.1.4.1.232.6.2.9.3.1.18",
cpqHeFltTolPowerSupplyRedundant => "1.3.6.1.4.1.232.6.2.9.3.1.9",
cpqHeFltTolPowerSupplyPresentValue => {
1 => "other",
Expand All @@ -44,6 +46,42 @@ sub init {
3 => "degraded",
4 => "failed",
},
cpqHeFltTolPowerSupplyStatusValue => {
1 => "noError",
2 => "generalFailure",
3 => "bistFailure",
4 => "fanFailure",
5 => "tempFailure",
6 => "interlockOpen",
7 => "epromFailed",
8 => "vrefFailed",
9 => "dacFailed",
10 => "ramTestFailed",
11 => "voltageChannelFailed",
12 => "orringdiodeFailed",
13 => "brownOut",
14 => "giveupOnStartup",
15 => "nvramInvalid",
16 => "calibrationTableInvalid",
17 => "noPowerInput",
},
cpqHeFltTolPowerSupplyErrorConditionValue => {
1 => "noError",
2 => "generalFailure",
3 => "overvoltage",
4 => "overcurrent",
5 => "overtemperature",
6 => "powerinputloss",
7 => "fanfailure",
8 => "vinhighwarning",
9 => "vinlowwarning",
10 => "vouthighwarning",
11 => "voutlowwarning",
12 => "inlettemphighwarning",
13 => "iinternaltemphighwarning",
14 => "vauxhighwarning",
15 => "vauxlowwarning",
},
cpqHeFltTolPowerSupplyCapacityUsed => '1.3.6.1.4.1.232.6.2.9.3.1.7',
cpqHeFltTolPowerSupplyCapacityMaximum => '1.3.6.1.4.1.232.6.2.9.3.1.8',
cpqHeFltTolPowerSupplyRedundantValue => {
Expand Down

0 comments on commit 4670d56

Please sign in to comment.