From 25e9981d62bc073ce0a9cd0730471cf3d7313ea0 Mon Sep 17 00:00:00 2001 From: Mareau Bastien Date: Mon, 6 May 2019 11:43:23 +0200 Subject: [PATCH] + handle illegal division by 0 (#1492) --- .../storage/dell/equallogic/snmp/mode/poolusage.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/centreon-plugins/storage/dell/equallogic/snmp/mode/poolusage.pm b/centreon-plugins/storage/dell/equallogic/snmp/mode/poolusage.pm index 49a498c55..9274305f8 100644 --- a/centreon-plugins/storage/dell/equallogic/snmp/mode/poolusage.pm +++ b/centreon-plugins/storage/dell/equallogic/snmp/mode/poolusage.pm @@ -154,6 +154,11 @@ sub manage_selection { foreach (keys %{$self->{pool}}) { my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $_); + if ($result->{eqlStoragePoolStatsSpace} == 0) { + $self->{output}->output_add(long_msg => "skipping pool '" . $_ . "'. Total size is 0", debug => 1); + next; + } + $self->{pool}->{$_}->{total} = $result->{eqlStoragePoolStatsSpace} * 1024 * 1024; $self->{pool}->{$_}->{used} = $result->{eqlStoragePoolStatsSpaceUsed} * 1024 * 1024; }