Fix missing Elasticsearch metrics
When the metric's value was 0, it was skipped by the collectd plugin.
Change-Id: I5d9adf51c38c2cf24dfc37a0992a26f3bd8baa00
Closes-Bug: #1568814
(cherry picked from commit 2136cc8d4b
)
This commit is contained in:
parent
d9ffece249
commit
934fd4506a
|
@ -81,7 +81,7 @@ class ElasticsearchClusterHealthPlugin(base.Base):
|
|||
}
|
||||
for metric in METRICS:
|
||||
value = data.get(metric)
|
||||
if not value:
|
||||
if value is None:
|
||||
# Depending on the Elasticsearch version, not all metrics are
|
||||
# available
|
||||
self.logger.info("Couldn't find {} metric".format(metric))
|
||||
|
|
Loading…
Reference in New Issue