[prometheus] Group per instance
parent
f8749d7d62
commit
d75dd689a6
|
@ -21,7 +21,7 @@ route:
|
||||||
# The labels by which incoming alerts are grouped together. For example,
|
# The labels by which incoming alerts are grouped together. For example,
|
||||||
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
||||||
# be batched into a single group.
|
# 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
|
# When a new group of alerts is created by an incoming alert, wait at
|
||||||
# least 'group_wait' to send the initial notification.
|
# least 'group_wait' to send the initial notification.
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
name:
|
name:
|
||||||
- prometheus
|
- prometheus
|
||||||
- prometheus-snmp-exporter
|
- prometheus-snmp-exporter
|
||||||
- snmp-mibs-downloader # To generate SNMP configuration
|
|
||||||
register: apt_result
|
register: apt_result
|
||||||
retries: 3
|
retries: 3
|
||||||
until: apt_result is succeeded
|
until: apt_result is succeeded
|
||||||
|
@ -25,16 +24,21 @@
|
||||||
- alert.rules.yml
|
- alert.rules.yml
|
||||||
- django.rules.yml
|
- django.rules.yml
|
||||||
|
|
||||||
# Doesn't work on Debian Stretch
|
|
||||||
- name: Make Prometheus snmp-exporter listen on localhost only
|
- name: Make Prometheus snmp-exporter listen on localhost only
|
||||||
when:
|
|
||||||
- ansible_lsb.codename == 'buster'
|
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/default/prometheus-snmp-exporter
|
path: /etc/default/prometheus-snmp-exporter
|
||||||
regexp: '^ARGS='
|
regexp: '^ARGS='
|
||||||
line: "ARGS=\"--web.listen-address=127.0.0.1:9116\""
|
line: "ARGS=\"--web.listen-address=127.0.0.1:9116\""
|
||||||
notify: Restart prometheus-snmp-exporter
|
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
|
# We don't need to restart Prometheus when updating nodes
|
||||||
- name: Configure Prometheus nodes
|
- name: Configure Prometheus nodes
|
||||||
copy:
|
copy:
|
||||||
|
|
Loading…
Reference in New Issue