From 641d26814e7c038e694a364b7087256c75b702ff Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Mon, 30 Jan 2017 14:12:31 +0100 Subject: [PATCH] + Fix #589 --- storage/dell/compellent/snmp/mode/components/encltemp.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/storage/dell/compellent/snmp/mode/components/encltemp.pm b/storage/dell/compellent/snmp/mode/components/encltemp.pm index 7577a0c2e..86fe44534 100644 --- a/storage/dell/compellent/snmp/mode/components/encltemp.pm +++ b/storage/dell/compellent/snmp/mode/components/encltemp.pm @@ -55,14 +55,16 @@ sub check { $self->{output}->output_add(long_msg => sprintf("enclosure temperature '%s' status is '%s' [instance = %s] [value = %s]", $result->{scEnclTempLocation}, $result->{scEnclTempStatus}, $instance, - $result->{scEnclTempCurrentC})); + defined($result->{scEnclTempCurrentC}) ? $result->{scEnclTempCurrentC} : '-'); my $exit = $self->get_severity(label => 'default', section => 'encltemp', value => $result->{scEnclTempStatus}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("Enclosure temperature '%s' status is '%s'", $result->{scEnclTempLocation}, $result->{scEnclTempStatus})); } - + + next if (!defined($result->{scEnclTempCurrentC})); + my ($exit2, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'encltemp', instance => $instance, value => $result->{scEnclTempCurrentC}); if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {