From 05791eadfbd438a21e3af961fcdae6ae8663fc50 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Thu, 3 Nov 2016 18:00:28 +0100 Subject: [PATCH] Add collectd support --- influxdb/files/collectd_influxdb.conf | 8 ++++++++ influxdb/meta/collectd.yml | 17 +++++++++++++++++ metadata/service/support.yml | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 influxdb/files/collectd_influxdb.conf create mode 100644 influxdb/meta/collectd.yml 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: -- 2.32.7