|
|
|
@ -13,12 +13,14 @@
|
|
|
|
|
template:
|
|
|
|
|
src: prometheus/prometheus.yml.j2
|
|
|
|
|
dest: /etc/prometheus/prometheus.yml
|
|
|
|
|
mode: 0644
|
|
|
|
|
notify: Restart Prometheus
|
|
|
|
|
|
|
|
|
|
- name: Configure Prometheus alert rules
|
|
|
|
|
template:
|
|
|
|
|
src: "prometheus/{{ item }}.j2"
|
|
|
|
|
dest: "/etc/prometheus/{{ item }}"
|
|
|
|
|
mode: 0644
|
|
|
|
|
notify: Restart Prometheus
|
|
|
|
|
loop:
|
|
|
|
|
- alert.rules.yml
|
|
|
|
@ -45,12 +47,14 @@
|
|
|
|
|
copy:
|
|
|
|
|
content: "{{ prometheus_targets | to_nice_json }}"
|
|
|
|
|
dest: /etc/prometheus/targets.json
|
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
|
|
# We don't need to restart Prometheus when updating nodes
|
|
|
|
|
- name: Configure Prometheus Ubiquity Unifi SNMP devices
|
|
|
|
|
copy:
|
|
|
|
|
content: "{{ prometheus_unifi_snmp_targets | to_nice_json }}"
|
|
|
|
|
dest: /etc/prometheus/targets_unifi_snmp.json
|
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
|
|
- name: Activate prometheus service
|
|
|
|
|
systemd:
|
|
|
|
|