summaryrefslogtreecommitdiff
path: root/roles/monitoring/collectd/prometheus/tasks/main.yml
blob: 6b4f7c93e6c900d4a19e2cd1392d05c91f98bb6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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