fix kaspersky snmp deployment devision by zero (#1070)

This commit is contained in:
Colin Gagnaire 2018-07-20 17:59:47 +02:00 committed by GitHub
parent b36fe66f8a
commit 070f8ec71f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}