diff --git a/collectors/0/elasticsearch.py b/collectors/0/elasticsearch.py index 70a758bb..6e52cdf5 100755 --- a/collectors/0/elasticsearch.py +++ b/collectors/0/elasticsearch.py @@ -106,6 +106,9 @@ def printmetric(metric, ts, value, tags): for name, value in tags.items()) else: tags = "" + # Convert any bool values to int, as opentsdb only accepts int or float. + if isinstance(value, bool): + value = int(value) print("%s %d %s %s" % (metric, ts, value, tags))