Cleanup Prometheus alerts #45

Merged
jeltz merged 11 commits from prometheus_alerts into master 2021-04-01 19:24:26 +02:00
5 changed files with 10 additions and 13 deletions
Showing only changes of commit bc35cd8e90 - Show all commits

View file

@ -11,20 +11,16 @@
- name: Configure Prometheus
template:
src: prometheus/prometheus.yml.j2
src: 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
owner: prometheus
group: prometheus
mode: u=r,g=r,o=
loop:
- prometheus.yml
- alert.rules.yml
- django.rules.yml
notify: Restart Prometheus
- name: Make Prometheus snmp-exporter listen on localhost only
lineinfile:
@ -36,10 +32,11 @@
# This file store SNMP OIDs
- name: Configure Prometheus snmp-exporter
template:
src: "prometheus/snmp.yml.j2"
dest: "/etc/prometheus/snmp.yml"
mode: 0600
src: snmp.yml.j2
dest: /etc/prometheus/snmp.yml
owner: prometheus
group: prometheus
mode: u=r,g=r,o=
notify: Restart prometheus-snmp-exporter
# We don't need to restart Prometheus when updating nodes