(plugin) hardware::server::hp::proliant::snmp - memory component error (#3575)
This commit is contained in:
parent
04aff7a8aa
commit
ba119ccb3b
|
@ -68,8 +68,8 @@ sub check {
|
|||
$self->{components}->{ilo} = {name => 'ilo', total => 0, skip => 0};
|
||||
return if ($self->check_filter(section => 'ilo'));
|
||||
|
||||
return if (scalar(keys %{$self->{results}->{$mapping->{cpqSm2MibCondition}->{oid}}}) == 0);
|
||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$mapping->{cpqSm2MibCondition}->{oid}}, instance => '0');
|
||||
return if (scalar(keys %{$self->{results}->{$mapping->{cpqSm2MibCondition}->{oid}}}) <= 0);
|
||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$mapping->{cpqSm2MibCondition}->{oid}}, instance => 0);
|
||||
|
||||
next if ($self->check_filter(section => 'ilo', instance => '0'));
|
||||
$self->{components}->{ilo}->{total}++;
|
||||
|
@ -83,14 +83,22 @@ sub check {
|
|||
}
|
||||
}
|
||||
|
||||
$self->{output}->output_add(long_msg => sprintf("ilo status is %s [message = %s].",
|
||||
$result->{cpqSm2MibCondition}, join(', ', @message_error)));
|
||||
$self->{output}->output_add(
|
||||
long_msg => sprintf(
|
||||
"ilo status is %s [message = %s].",
|
||||
$result->{cpqSm2MibCondition}, join(', ', @message_error)
|
||||
)
|
||||
);
|
||||
my $exit = $self->get_severity(label => 'default', section => 'ilo', value => $result->{cpqSm2MibCondition});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("ilo is %s",
|
||||
$result->{cpqSm2MibCondition}));
|
||||
$self->{output}->output_add(
|
||||
severity => $exit,
|
||||
short_msg => sprintf(
|
||||
"ilo is %s",
|
||||
$result->{cpqSm2MibCondition}
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -61,6 +61,8 @@ sub check {
|
|||
$self->{components}->{memory} = { name => 'memory', total => 0, skip => 0 };
|
||||
return if ($self->check_filter(section => 'memory'));
|
||||
|
||||
return if (scalar(keys %{$self->{results}->{$oid_cpqHeResMem2Module}}) <= 0);
|
||||
|
||||
$self->{snmp}->load(
|
||||
oids => [map($_->{oid}, values(%$mapping))],
|
||||
instances => [values(%{$self->{results}->{$oid_cpqHeResMem2Module}})]
|
||||
|
|
Loading…
Reference in New Issue