Skip to content

Commit

Permalink
Merge pull request #63 from signalfx/elasticsearch-write-threadpool
Browse files Browse the repository at this point in the history
collectd-elasticsearch: add write metric to thread_pools for 6.3+ versions
  • Loading branch information
darshanpatel29 authored Jul 18, 2019
2 parents 9a8894b + 942f59b commit 4206b95
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions elasticsearch_collectd.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,17 @@ def init_stats(self):
and not self.es_version.startswith("2.0"):
thread_pools.extend(['force_merge'])

# Add the 6.3 metrics
if self.es_version.startswith("6."):
if self.es_version[2:].find(".") != -1:
minor_release_number = self.es_version[2: 2 + self.es_version[2:].find(".")]
else:
minor_release_number = self.es_version[2:]
if int(minor_release_number) > 2:
thread_pools.extend(['write'])
elif int(self.es_version[:self.es_version.find(".")]) > 6:
thread_pools.extend(['write'])

# Legacy support for old configurations without Thread Pools config
if len(self.configured_thread_pools) == 0:
self.thread_pools = list(self.configured_thread_pools)
Expand Down

0 comments on commit 4206b95

Please sign in to comment.