Merge "Ignore sending null values from shaker output to Elasticsearch"
This commit is contained in:
commit
9f86c4f45c
@ -96,8 +96,8 @@ class Elastic(object):
|
||||
doc_type=_type,
|
||||
refresh=True)
|
||||
self.logger.info("Pushed data to Elasticsearch to index {}"
|
||||
" and browbeat UUID {}" .format(self.index,
|
||||
result['browbeat_uuid']))
|
||||
" and browbeat UUID {}" .format(self.index,
|
||||
result['browbeat_uuid']))
|
||||
break
|
||||
except Exception:
|
||||
self.logger.error("Error pushing data to Elasticsearch, going to retry"
|
||||
|
@ -172,8 +172,11 @@ class Shaker(WorkloadBase.WorkloadBase):
|
||||
self.grafana.grafana_urls()],
|
||||
'shaker_uuid': str(shaker_uuid)}
|
||||
# Ship Data to ES when record status is ok
|
||||
result = self.elastic.combine_metadata(shaker_stats)
|
||||
self.elastic.index_result(result, test_name)
|
||||
if result['value'] is None:
|
||||
self.logger.debug("Ignoring sending null values to ES")
|
||||
else:
|
||||
result = self.elastic.combine_metadata(shaker_stats)
|
||||
self.elastic.index_result(result, test_name)
|
||||
else:
|
||||
# If the status of the record is not ok, ship minimal
|
||||
# shaker_stats dictionary to ES
|
||||
|
Loading…
x
Reference in New Issue
Block a user