From 528c4e8562291ccc7ef201121ff728e33b3cc6f4 Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Tue, 10 Feb 2015 16:57:19 +0100 Subject: [PATCH] Fix countvm perfdata --- .../vmware/src/centreon/esxd/cmdcountvmhost.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/connectors/vmware/src/centreon/esxd/cmdcountvmhost.pm b/connectors/vmware/src/centreon/esxd/cmdcountvmhost.pm index a8fe63c2f..e94aaef32 100644 --- a/connectors/vmware/src/centreon/esxd/cmdcountvmhost.pm +++ b/connectors/vmware/src/centreon/esxd/cmdcountvmhost.pm @@ -139,13 +139,11 @@ sub run { $labels->[0])); } - if ($multiple == 1) { - $self->{manager}->{output}->perfdata_add(label => $labels->[0] . $extra_label, - value => $vm_states{$labels->[0]}, - warning => $self->{manager}->{perfdata}->get_perfdata_for_output(label => $labels->[1]), - critical => $self->{manager}->{perfdata}->get_perfdata_for_output(label => $labels->[2]), - min => 0, max => $vm_states{poweredoff} + $vm_states{suspended} + $vm_states{poweredon}); - } + $self->{manager}->{output}->perfdata_add(label => $labels->[0] . $extra_label, + value => $vm_states{$labels->[0]}, + warning => $self->{manager}->{perfdata}->get_perfdata_for_output(label => $labels->[1]), + critical => $self->{manager}->{perfdata}->get_perfdata_for_output(label => $labels->[2]), + min => 0, max => $vm_states{poweredoff} + $vm_states{suspended} + $vm_states{poweredon}); } } }