"Increases delta of start_time when collecting OpenStack metrics" 60/7160/1 v5.0 v5.0.3 v5.0.4 v5.0.5
authorlavado <glavado@whitestack.com>
Thu, 31 Jan 2019 19:10:46 +0000 (20:10 +0100)
committerlavado <glavado@whitestack.com>
Thu, 31 Jan 2019 19:10:46 +0000 (20:10 +0100)
This reverts commit f8d6f160a42e66ac5c59ff01fd338053d110ee42.

Change-Id: I920dfa78faae4827db31298f60552e1e49a87eb9

osm_mon/collector/collectors/openstack.py

index 395d607..30bab0c 100644 (file)
@@ -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]
                 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,
                     resource_id = self._get_resource_uuid(nsr_id, vnf_member_index, vdur['name'])
                     try:
                         measures = self.gnocchi_client.metric.get_measures(gnocchi_metric_name,