From: Simon Pasquier Date: Thu, 3 Nov 2016 16:48:30 +0000 (+0100) Subject: Add collectd support X-Git-Tag: 2016.12~5^2~14^2 X-Git-Url: https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas%2Felasticsearch.git;a=commitdiff_plain;h=d9eea017cadb69504dbfb6d98666d1081e019228 Add collectd support --- diff --git a/elasticsearch/files/collectd_elasticsearch_cluster.conf b/elasticsearch/files/collectd_elasticsearch_cluster.conf new file mode 100644 index 0000000..49ddb85 --- /dev/null +++ b/elasticsearch/files/collectd_elasticsearch_cluster.conf @@ -0,0 +1,6 @@ +Import "elasticsearch_cluster" + + + Address "{{ plugin.address }}" + Port "{{ plugin.port }}" + diff --git a/elasticsearch/meta/collectd.yml b/elasticsearch/meta/collectd.yml new file mode 100644 index 0000000..20952d4 --- /dev/null +++ b/elasticsearch/meta/collectd.yml @@ -0,0 +1,14 @@ +{%- if pillar.elasticsearch.server is defined %} +{%- from "elasticsearch/map.jinja" import server with context %} + +local_plugin: + elasticsearch_cluster: + plugin: python + template: elasticsearch/files/collectd_elasticsearch_cluster.conf + address: {{ server.get('bind', {}).get('address', '127.0.0.1') }} + port: {{ server.get('bind', {}).get('port', 9200) }} + collectd_processes: + process: + elasticsearch: + match: 'java.*elasticsearch' +{%- endif %} diff --git a/metadata/service/support.yml b/metadata/service/support.yml index b851c62..8fd5300 100644 --- a/metadata/service/support.yml +++ b/metadata/service/support.yml @@ -2,7 +2,7 @@ parameters: elasticsearch: _support: collectd: - enabled: false + enabled: true heka: enabled: true sensu: