+ Protect to avoid errors on checking h3c hardware on wrong hardware
This commit is contained in:
parent
b498c8ee5e
commit
2cdd7ae294
|
@ -57,6 +57,7 @@ sub check {
|
|||
foreach my $instance (sort $self->get_instance_class(class => { $options{component_class} => 1 })) {
|
||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$self->{branch} . '.19'}, instance => $instance);
|
||||
|
||||
next if (!defined($result->{EntityExtErrorStatus}));
|
||||
next if ($self->check_exclude(section => $options{component}, instance => $instance));
|
||||
if ($result->{EntityExtErrorStatus} =~ /entityAbsent/i) {
|
||||
$self->absent_problem(section => $options{component}, instance => $instance);
|
||||
|
|
|
@ -45,6 +45,7 @@ sub check {
|
|||
foreach my $instance (sort $self->get_instance_class(class => { 7 => 1 })) {
|
||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$self->{branch} . '.19'}, instance => $instance);
|
||||
|
||||
next if (!defined($result->{EntityExtErrorStatus}));
|
||||
next if ($self->check_exclude(section => 'fan', instance => $instance));
|
||||
if ($result->{EntityExtErrorStatus} =~ /entityAbsent/i) {
|
||||
$self->absent_problem(section => 'fan', instance => $instance);
|
||||
|
|
|
@ -45,6 +45,7 @@ sub check {
|
|||
foreach my $instance (sort $self->get_instance_class(class => { 6 => 1 }) ) {
|
||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$self->{branch} . '.19'}, instance => $instance);
|
||||
|
||||
next if (!defined($result->{EntityExtErrorStatus}));
|
||||
next if ($self->check_exclude(section => 'psu', instance => $instance));
|
||||
if ($result->{EntityExtErrorStatus} =~ /entityAbsent/i) {
|
||||
$self->absent_problem(section => 'psu', instance => $instance);
|
||||
|
|
|
@ -58,6 +58,7 @@ sub check {
|
|||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$self->{branch} . '.19'}, instance => $instance);
|
||||
my $result2 = $self->{snmp}->map_instance(mapping => $mapping2, results => $results, instance => $instance);
|
||||
|
||||
next if (!defined($result->{EntityExtErrorStatus}));
|
||||
next if ($self->check_exclude(section => 'sensor', instance => $instance));
|
||||
if ($result->{EntityExtErrorStatus} =~ /entityAbsent/i) {
|
||||
$self->absent_problem(section => 'sensor', instance => $instance);
|
||||
|
|
Loading…
Reference in New Issue