From bea1844582a1c21cc8cdeec0149ddf31297d7e23 Mon Sep 17 00:00:00 2001 From: Lucie Dubrunfaut <123162035+lucie-dubrunfaut@users.noreply.github.com> Date: Wed, 8 Nov 2023 09:32:05 +0100 Subject: [PATCH] [MON-21885] [Plugin] Bad incrementation in VMware health (#4716) --- src/apps/vmware/connector/mode/healthhost.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/apps/vmware/connector/mode/healthhost.pm b/src/apps/vmware/connector/mode/healthhost.pm index 33061cda3..66bad79b9 100644 --- a/src/apps/vmware/connector/mode/healthhost.pm +++ b/src/apps/vmware/connector/mode/healthhost.pm @@ -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},