mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
- Bug fix hp proliant snmp check
This commit is contained in:
parent
6768387949
commit
781c6669a7
@ -73,7 +73,7 @@ my $oid_cpqNicIfLogMapAdapterCount = '.1.3.6.1.4.1.232.18.2.2.1.1.5';
|
|||||||
sub load {
|
sub load {
|
||||||
my (%options) = @_;
|
my (%options) = @_;
|
||||||
|
|
||||||
push @{$options{request}}, { oid => $oid_cpqNicIfLogMapEntry, start => $mapping->{cpqNicIfLogMapCondition}->{oid}, end => $mapping->{cpqNicIfLogMapStatus}->{oid} };
|
push @{$options{request}}, { oid => $oid_cpqNicIfLogMapEntry, start => $mapping3->{cpqNicIfLogMapCondition}->{oid}, end => $mapping3->{cpqNicIfLogMapStatus}->{oid} };
|
||||||
push @{$options{request}}, { oid => $oid_cpqNicIfLogMapDescription };
|
push @{$options{request}}, { oid => $oid_cpqNicIfLogMapDescription };
|
||||||
push @{$options{request}}, { oid => $oid_cpqNicIfLogMapAdapterCount };
|
push @{$options{request}}, { oid => $oid_cpqNicIfLogMapAdapterCount };
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ sub check {
|
|||||||
next if ($self->check_exclude(section => 'lnic', instance => $instance));
|
next if ($self->check_exclude(section => 'lnic', instance => $instance));
|
||||||
$self->{components}->{lnic}->{total}++;
|
$self->{components}->{lnic}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => printf("logical nic '%s' [adapter count: %s, description: %s, status: %s] condition is %s.",
|
$self->{output}->output_add(long_msg => sprintf("logical nic '%s' [adapter count: %s, description: %s, status: %s] condition is %s.",
|
||||||
$instance, $result2->{cpqNicIfLogMapAdapterCount}, centreon::plugins::misc::trim($result->{cpqNicIfLogMapDescription}),
|
$instance, $result2->{cpqNicIfLogMapAdapterCount}, centreon::plugins::misc::trim($result->{cpqNicIfLogMapDescription}),
|
||||||
$result3->{cpqNicIfLogMapStatus},
|
$result3->{cpqNicIfLogMapStatus},
|
||||||
$result3->{cpqNicIfLogMapCondition}));
|
$result3->{cpqNicIfLogMapCondition}));
|
||||||
|
@ -88,7 +88,7 @@ my $oid_cpqNicIfPhysAdapterRole = '.1.3.6.1.4.1.232.18.2.3.1.1.3';
|
|||||||
sub load {
|
sub load {
|
||||||
my (%options) = @_;
|
my (%options) = @_;
|
||||||
|
|
||||||
push @{$options{request}}, { oid => $oid_cpqNicIfPhysAdapterEntry, start => $mapping->{cpqNicIfPhysAdapterDuplexState}->{oid}, end => $mapping->{cpqNicIfPhysAdapterStatus}->{oid} };
|
push @{$options{request}}, { oid => $oid_cpqNicIfPhysAdapterEntry, start => $mapping2->{cpqNicIfPhysAdapterDuplexState}->{oid}, end => $mapping2->{cpqNicIfPhysAdapterStatus}->{oid} };
|
||||||
push @{$options{request}}, { oid => $oid_cpqNicIfPhysAdapterRole };
|
push @{$options{request}}, { oid => $oid_cpqNicIfPhysAdapterRole };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,8 @@ sub check {
|
|||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("powersupply '%s' status is %s [redundance: %s, redundant partner: %s] (status %s).",
|
$self->{output}->output_add(long_msg => sprintf("powersupply '%s' status is %s [redundance: %s, redundant partner: %s] (status %s).",
|
||||||
$instance, $result->{cpqHeFltTolPowerSupplyCondition},
|
$instance, $result->{cpqHeFltTolPowerSupplyCondition},
|
||||||
$result->{cpqHeFltTolPowerSupplyRedundant}, $result2->{cpqHeFltTolPowerSupplyRedundantPartner},
|
$result->{cpqHeFltTolPowerSupplyRedundant},
|
||||||
|
defined($result2->{cpqHeFltTolPowerSupplyRedundantPartner}) ? $result2->{cpqHeFltTolPowerSupplyRedundantPartner} : 'unknown',
|
||||||
$result->{cpqHeFltTolPowerSupplyStatus}
|
$result->{cpqHeFltTolPowerSupplyStatus}
|
||||||
));
|
));
|
||||||
my $exit = $self->get_severity(section => 'psu', value => $result->{cpqHeFltTolPowerSupplyCondition});
|
my $exit = $self->get_severity(section => 'psu', value => $result->{cpqHeFltTolPowerSupplyCondition});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user