diff --git a/roles/prometheus-alertmanager/templates/prometheus/alertmanager.yml.j2 b/roles/prometheus-alertmanager/templates/prometheus/alertmanager.yml.j2 index 2e2a8af195ca8290abeb91dcf816608a71cedf78..9adcd3cc89bf0aea5597a853da65b8516887211c 100644 --- a/roles/prometheus-alertmanager/templates/prometheus/alertmanager.yml.j2 +++ b/roles/prometheus-alertmanager/templates/prometheus/alertmanager.yml.j2 @@ -21,7 +21,7 @@ route: # The labels by which incoming alerts are grouped together. For example, # multiple alerts coming in for cluster=A and alertname=LatencyHigh would # be batched into a single group. - group_by: ['...'] # do not group for text chat + group_by: ['instance'] # group per instance # When a new group of alerts is created by an incoming alert, wait at # least 'group_wait' to send the initial notification. diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index 7b4e12d5efa5973e7bf8d5b1ebbee9bff0cf0dc7..0e775a097dc8ea12009f89120309b3271051db19 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -5,7 +5,6 @@ name: - prometheus - prometheus-snmp-exporter - - snmp-mibs-downloader # To generate SNMP configuration register: apt_result retries: 3 until: apt_result is succeeded @@ -25,16 +24,21 @@ - alert.rules.yml - django.rules.yml -# Doesn't work on Debian Stretch - name: Make Prometheus snmp-exporter listen on localhost only - when: - - ansible_lsb.codename == 'buster' lineinfile: path: /etc/default/prometheus-snmp-exporter regexp: '^ARGS=' line: "ARGS=\"--web.listen-address=127.0.0.1:9116\"" notify: Restart prometheus-snmp-exporter +#- name: Configure Prometheus snmp-exporter +# template: +# src: "prometheus/snmp.yml.j2" +# dest: "/etc/prometheus/snmp.yml" +# mode: 0600 +# owner: prometheus +# notify: Restart prometheus-snmp-exporter + # We don't need to restart Prometheus when updating nodes - name: Configure Prometheus nodes copy: