[MON-21885] [Plugin] Bad incrementation in VMware health (#4716)

This commit is contained in:
Lucie Dubrunfaut 2023-11-08 09:32:05 +01:00 committed by GitHub
parent c9021513d1
commit bea1844582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -257,9 +257,8 @@ sub manage_selection {
$status = lc($1) if ($entry->{status} =~ /(yellow|red)/i);
$self->{host}->{$host_name}->{global_problems}->{$status}++;
$self->{host}->{$host_name}->{global_problems}->{total}++;
if ($status eq 'ok') {
$self->{host}->{$host_name}->{global_problems}->{total_problems}++
} else {
if ($status ne 'ok') {
$self->{host}->{$host_name}->{global_problems}->{total_problems}++;
$self->{host}->{$host_name}->{global_summary}->{$i} = {
type => defined($entry->{type}) ? $entry->{type} : '',
name => $entry->{name},