Increases delta of start_time when collecting OpenStack metrics 27/7127/1
authorBenjamin Diaz <bdiaz@whitestack.com>
Fri, 25 Jan 2019 19:31:55 +0000 (16:31 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Fri, 25 Jan 2019 19:41:31 +0000 (16:41 -0300)
Change-Id: I5d51c26a7a80a407a6f892d542d44420c5832e02
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
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]
-                    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,