diff --git a/storage/hp/p2000/xmlapi/mode/components/enclosure.pm b/storage/hp/p2000/xmlapi/mode/components/enclosure.pm index 032380ea4..8bf4bfe10 100644 --- a/storage/hp/p2000/xmlapi/mode/components/enclosure.pm +++ b/storage/hp/p2000/xmlapi/mode/components/enclosure.pm @@ -52,7 +52,7 @@ sub check { my $state = $health{$results->{$enc_id}->{'health-numeric'}}; $self->{output}->output_add(long_msg => sprintf("enclosure '%s' status is %s [instance: %s] [reason: %s]", - $enc_id, $state, $enc_id, $health{$results->{$enc_id}->{'health-reason'}}) + $enc_id, $state, $enc_id, $results->{$enc_id}->{'health-reason'}) ); my $exit = $self->get_severity(label => 'default', section => 'enclosure', value => $state); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { diff --git a/storage/hp/p2000/xmlapi/mode/components/sensor.pm b/storage/hp/p2000/xmlapi/mode/components/sensor.pm index c5983c119..082f74365 100644 --- a/storage/hp/p2000/xmlapi/mode/components/sensor.pm +++ b/storage/hp/p2000/xmlapi/mode/components/sensor.pm @@ -62,7 +62,7 @@ sub check { # Warning # foreach my $sensor_id (keys %$results) { - my ($value, $unit); + my ($value, $unit) = ('', '');; ($value, $unit) = ($1, $2) if ($results->{$sensor_id}->{value} =~ /\s*([0-9\.,]+)\s*(\S*)\s*/); if (defined($results->{$sensor_id}->{'sensor-type'}) && defined($sensor_type{$results->{$sensor_id}->{'sensor-type'}})) { $unit = $sensor_type{$results->{$sensor_id}->{'sensor-type'}}->{unit};