+ fix problem with predective failure
This commit is contained in:
parent
04ebdc5837
commit
bd3a2bfca8
|
@ -93,6 +93,7 @@ sub check {
|
|||
my $result3 = $self->{snmp}->map_instance(mapping => $mapping3, results => $self->{results}->{$mapping3->{batteryPredictedCapicity}->{oid}}, instance => $instance);
|
||||
my $result4 = $self->{snmp}->map_instance(mapping => $mapping4, results => $self->{results}->{$mapping4->{batteryLearnState}->{oid}}, instance => $instance);
|
||||
$result4->{batteryLearnState} = defined($result4->{batteryLearnState}) ? $result4->{batteryLearnState} : '-';
|
||||
$result3->{batteryPredictedCapicity} = defined($result3->{batteryPredictedCapicity}) ? $result3->{batteryPredictedCapicity} : '-';
|
||||
|
||||
next if ($self->check_exclude(section => 'cachebattery', instance => $instance));
|
||||
|
||||
|
|
|
@ -83,7 +83,8 @@ sub check {
|
|||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_channelEntry}, instance => $instance);
|
||||
my $result2 = $self->{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$mapping2->{channelComponentStatus}->{oid}}, instance => $instance);
|
||||
my $result3 = $self->{snmp}->map_instance(mapping => $mapping3, results => $self->{results}->{$mapping3->{channelBusType}->{oid}}, instance => $instance);
|
||||
|
||||
$result3->{channelBusType} = defined($result3->{channelBusType}) ? $result3->{channelBusType} : '-';
|
||||
|
||||
next if ($self->check_exclude(section => 'connector', instance => $instance));
|
||||
|
||||
$self->{components}->{connector}->{total}++;
|
||||
|
|
|
@ -85,7 +85,8 @@ sub check {
|
|||
|
||||
$self->{output}->output_add(long_msg => sprintf("Cpu '%s' status is '%s' [instance: %s, manufacturer name: %s, brand name: %s, state: %s, speed: %s]",
|
||||
$instance, $result->{processorDeviceStatus}, $instance,
|
||||
$result2->{processorDeviceManufacturerName}, $result4->{processorDeviceBrandName},
|
||||
$result2->{processorDeviceManufacturerName},
|
||||
defined($result4->{processorDeviceBrandName}) ? $result4->{processorDeviceBrandName} : '-',
|
||||
$result2->{processorDeviceStatusState}, $result3->{processorDeviceCurrentSpeed}
|
||||
));
|
||||
my $exit = $self->get_severity(section => 'cpu', value => $result->{processorDeviceStatus});
|
||||
|
|
|
@ -107,7 +107,8 @@ sub check {
|
|||
|
||||
$self->{output}->output_add(long_msg => sprintf("Physical Disk '%s' status is '%s' [instance: %s, state: %s, spare state: %s, smart alert: %s]",
|
||||
$result->{arrayDiskName}, $result4->{arrayDiskComponentStatus}, $instance,
|
||||
$result2->{arrayDiskState}, $result3->{arrayDiskSpareState}, $result5->{arrayDiskSmartAlertIndication}
|
||||
$result2->{arrayDiskState}, $result3->{arrayDiskSpareState},
|
||||
defined($result5->{arrayDiskSmartAlertIndication}) ? $result5->{arrayDiskSmartAlertIndication} : '-'
|
||||
));
|
||||
my $exit = $self->get_severity(section => 'physicaldisk', value => $result4->{arrayDiskComponentStatus});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
|
@ -116,11 +117,13 @@ sub check {
|
|||
$result->{arrayDiskName}, $result4->{arrayDiskComponentStatus}));
|
||||
}
|
||||
|
||||
$exit = $self->get_severity(section => 'physicaldisk_smartalert', value => $result5->{arrayDiskSmartAlertIndication});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("physical disk '%s' has received a predictive failure alert",
|
||||
$result->{arrayDiskName}));
|
||||
if (defined($result5->{arrayDiskSmartAlertIndication})) {
|
||||
$exit = $self->get_severity(section => 'physicaldisk_smartalert', value => $result5->{arrayDiskSmartAlertIndication});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("physical disk '%s' has received a predictive failure alert",
|
||||
$result->{arrayDiskName}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,7 +100,8 @@ sub check {
|
|||
|
||||
$self->{output}->output_add(long_msg => sprintf("Power supply '%s' status is '%s' [instance: %s, location: %s, type: %s, output watts: %s, state: %s, configuration error: %s]",
|
||||
$instance, $result->{powerSupplyStatus}, $instance,
|
||||
$result->{powerSupplyLocationName}, $result->{powerSupplyType}, $result->{powerSupplyOutputWatts},
|
||||
$result->{powerSupplyLocationName}, $result->{powerSupplyType},
|
||||
defined($result->{powerSupplyOutputWatts}) ? $result->{powerSupplyOutputWatts} : '-',
|
||||
$result2->{powerSupplySensorState}, $result2->{powerSupplyConfigurationErrorType}
|
||||
));
|
||||
my $exit = $self->get_severity(section => 'psu', value => $result->{powerSupplyStatus});
|
||||
|
|
|
@ -52,7 +52,6 @@ my $maps_counters = {
|
|||
},
|
||||
};
|
||||
|
||||
|
||||
sub custom_threshold_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
|
|
Loading…
Reference in New Issue