From: pasquier-s Date: Fri, 4 Nov 2016 09:43:11 +0000 (+0100) Subject: Merge pull request #5 from simonpasquier/add-collectd-support X-Git-Tag: 2016.12~1^2~8 X-Git-Url: https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas%2Finfluxdb.git;a=commitdiff_plain;h=5b63596af3be9ff468e815e6eda66c846c2f9e23;hp=9813c4efca95db1f60bd8f2c0b4e1ba8df06d799 Merge pull request #5 from simonpasquier/add-collectd-support Add collectd support --- diff --git a/influxdb/files/collectd_influxdb.conf b/influxdb/files/collectd_influxdb.conf new file mode 100644 index 0000000..c909863 --- /dev/null +++ b/influxdb/files/collectd_influxdb.conf @@ -0,0 +1,8 @@ +Import "influxdb" + + + Address "{{ plugin.address }}" + Port "{{ plugin.port }}" + Username "{{ plugin.username }}" + Password "{{ plugin.password }}" + diff --git a/influxdb/meta/collectd.yml b/influxdb/meta/collectd.yml new file mode 100644 index 0000000..c09ea48 --- /dev/null +++ b/influxdb/meta/collectd.yml @@ -0,0 +1,17 @@ +{%- if pillar.influxdb.server is defined %} +{%- from "influxdb/map.jinja" import server with context %} + +{%- if server.admin.get('user', {}).get('enabled', False) and server.http.enabled %} +local_plugin: + influxdb: + plugin: python + template: influxdb/files/collectd_influxdb.conf + address: {{ server.http.bind.address|replace('0.0.0.0', '127.0.0.1') }} + port: {{ server.http.bind.port }} + username: {{ server.admin.user.name }} + password: {{ server.admin.user.password }} + collectd_processes: + process: + influxd: {} +{%- endif %} +{%- endif %} diff --git a/metadata/service/support.yml b/metadata/service/support.yml index 9b52193..2594e43 100644 --- a/metadata/service/support.yml +++ b/metadata/service/support.yml @@ -2,7 +2,7 @@ parameters: influxdb: _support: collectd: - enabled: false + enabled: true heka: enabled: false sensu: