From 323e843460b76c92bba3241f54aaede701721230 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 3 Dec 2015 11:12:32 +0100 Subject: [PATCH] + update changelog + Ref #1 --- connectors/vmware/changelog | 2 +- connectors/vmware/src/centreon/vmware/common.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/connectors/vmware/changelog b/connectors/vmware/changelog index 42ed661af..b890c5301 100644 --- a/connectors/vmware/changelog +++ b/connectors/vmware/changelog @@ -1,4 +1,4 @@ -2015-12-02 Quentin Garnier - 2.1.0 +2015-12-03 Quentin Garnier - 2.1.0 * Enhance: Add a command to monitor ESX services (issue #3) * Enhance: Can choose the sampling period (issue #1) * Enhance: Display ESX version in command 'getmap' (issue #2) diff --git a/connectors/vmware/src/centreon/vmware/common.pm b/connectors/vmware/src/centreon/vmware/common.pm index 148d8a161..73507a0d4 100644 --- a/connectors/vmware/src/centreon/vmware/common.pm +++ b/connectors/vmware/src/centreon/vmware/common.pm @@ -324,13 +324,13 @@ sub generic_performance_values_historic { if (defined($options{sampling_period}) && $options{sampling_period} ne '') { $interval = $options{sampling_period}; } - # check sampling period exist - if (!defined($obj_vmware->{sampling_periods}->{$interval})) { + # check sampling period exist (period 20 is not listed) + if ($interval != 20 && !defined($obj_vmware->{sampling_periods}->{$interval})) { $manager_display->{output}->output_add(severity => 'UNKNOWN', short_msg => sprintf("Sampling period '%s' not managed.", $interval)); return undef; } - if ($obj_vmware->{sampling_periods}->{$interval}->{enabled} != 1) { + if ($interval != 20 && $obj_vmware->{sampling_periods}->{$interval}->{enabled} != 1) { $manager_display->{output}->output_add(severity => 'UNKNOWN', short_msg => sprintf("Sampling period '%s' collection data no enabled.", $interval)); return undef;