From 070f8ec71f82b74ad7722f4b815a16be66cbf94d Mon Sep 17 00:00:00 2001 From: Colin Gagnaire Date: Fri, 20 Jul 2018 17:59:47 +0200 Subject: [PATCH] fix kaspersky snmp deployment devision by zero (#1070) --- apps/antivirus/kaspersky/snmp/mode/deployment.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/antivirus/kaspersky/snmp/mode/deployment.pm b/apps/antivirus/kaspersky/snmp/mode/deployment.pm index f0bf20dac..7a4691b70 100644 --- a/apps/antivirus/kaspersky/snmp/mode/deployment.pm +++ b/apps/antivirus/kaspersky/snmp/mode/deployment.pm @@ -97,7 +97,7 @@ sub custom_progress_calc { $self->{result_values}->{total} = $options{new_datas}->{$self->{instance} . '_hostsInGroups'}; $self->{result_values}->{installed} = $options{new_datas}->{$self->{instance} . '_hostsWithAntivirus'}; - $self->{result_values}->{prct_installed} = $self->{result_values}->{installed} * 100 / $self->{result_values}->{total}; + $self->{result_values}->{prct_installed} = ($self->{result_values}->{total} != 0) ? $self->{result_values}->{installed} * 100 / $self->{result_values}->{total} : 0; return 0; }