diff options
Diffstat (limited to 'roles/monitoring/collectd/prometheus/tasks')
-rw-r--r-- | roles/monitoring/collectd/prometheus/tasks/main.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/monitoring/collectd/prometheus/tasks/main.yml b/roles/monitoring/collectd/prometheus/tasks/main.yml new file mode 100644 index 00000000..6b4f7c93 --- /dev/null +++ b/roles/monitoring/collectd/prometheus/tasks/main.yml @@ -0,0 +1,19 @@ +--- +- name: install dependencies + apt: + name: + - libprotobuf-c1 + - libmicrohttpd12 + state: present + +- name: install prometheus plugin config + copy: + dest: /etc/collectd/conf.d/prometheus.conf + content: | + LoadPlugin "write_prometheus" + {% if collectd_prometheus_config is defined %} + <Plugin "write_prometheus"> + {{ collectd_prometheus_config | indent(width=2) }} + </Plugin> + {% endif %} + notify: restart collectd |