+ Enhance cisco standard hardware mode (some cases)
This commit is contained in:
parent
eecc69a63f
commit
514d2a0d66
|
@ -56,6 +56,11 @@ sub check {
|
|||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_cefcPhysicalStatus}, instance => $instance);
|
||||
my $physical_descr = $self->{results}->{$oid_entPhysicalDescr}->{$oid_entPhysicalDescr . '.' . $instance};
|
||||
|
||||
if (!defined($physical_descr)) {
|
||||
$self->{output}->output_add(long_msg => sprintf("skipped instance '%s': no description", $instance));
|
||||
next;
|
||||
}
|
||||
|
||||
next if ($self->check_exclude(section => 'physical', instance => $instance));
|
||||
|
||||
$self->{components}->{physical}->{total}++;
|
||||
|
|
|
@ -64,7 +64,7 @@ sub check {
|
|||
|
||||
$self->{output}->output_add(long_msg => sprintf("Temperature '%s' status is %s [instance: %s] [value: %s C]",
|
||||
$result->{ciscoEnvMonTemperatureStatusDescr}, $result->{ciscoEnvMonTemperatureState},
|
||||
$instance, $result->{ciscoEnvMonTemperatureStatusValue}));
|
||||
$instance, defined($result->{ciscoEnvMonTemperatureStatusValue}) ? $result->{ciscoEnvMonTemperatureStatusValue} : '-'));
|
||||
my $exit = $self->get_severity(section => 'temperature', value => $result->{ciscoEnvMonTemperatureState});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
|
@ -72,6 +72,8 @@ sub check {
|
|||
$result->{ciscoEnvMonTemperatureStatusDescr}, $result->{ciscoEnvMonTemperatureState}));
|
||||
}
|
||||
|
||||
next if (!defined($result->{ciscoEnvMonTemperatureStatusValue}));
|
||||
|
||||
my ($exit2, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $result->{ciscoEnvMonTemperatureStatusValue});
|
||||
if ($checked == 0) {
|
||||
my $warn_th = undef;
|
||||
|
|
Loading…
Reference in New Issue