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"
+
+<Module "elasticsearch_cluster">
+ Address "{{ plugin.address }}"
+ Port "{{ plugin.port }}"
+</Module>
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 @@
elasticsearch:
_support:
collectd:
- enabled: false
+ enabled: true
heka:
enabled: true
sensu: