From: Benjamin Diaz Date: Fri, 25 Jan 2019 19:31:55 +0000 (-0300) Subject: Increases delta of start_time when collecting OpenStack metrics X-Git-Tag: v5.0.3~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=1b6b0e02f6f82ccc8a441e26bb42183f63a48acc;p=osm%2FMON.git Increases delta of start_time when collecting OpenStack metrics Change-Id: I5d51c26a7a80a407a6f892d542d44420c5832e02 Signed-off-by: Benjamin Diaz --- diff --git a/osm_mon/collector/collectors/openstack.py b/osm_mon/collector/collectors/openstack.py index 395d607..30bab0c 100644 --- a/osm_mon/collector/collectors/openstack.py +++ b/osm_mon/collector/collectors/openstack.py @@ -99,7 +99,8 @@ class OpenstackCollector(BaseVimCollector): for param in vdu['monitoring-param']: metric_name = param['nfvi-metric'] gnocchi_metric_name = METRIC_MAPPINGS[metric_name] - start_date = datetime.datetime.now() - datetime.timedelta(seconds=self.granularity) + delta = 10 * self.granularity + start_date = datetime.datetime.now() - datetime.timedelta(seconds=delta) resource_id = self._get_resource_uuid(nsr_id, vnf_member_index, vdur['name']) try: measures = self.gnocchi_client.metric.get_measures(gnocchi_metric_name,