Skip to content
Snippets Groups Projects
Commit fe67077e authored by ale's avatar ale
Browse files

Send all alertmanager notifications from the same handler

parent 637c92f0
No related branches found
No related tags found
No related merge requests found
...@@ -20,14 +20,9 @@ route: ...@@ -20,14 +20,9 @@ route:
# Only severity=page alerts are ever sent anywhere. # Only severity=page alerts are ever sent anywhere.
routes: routes:
- receiver: 'alert-email' - receiver: alert
match: match:
severity: page severity: page
{% for webhook in alert_webhook_receivers | default([]) %}
- receiver: "{{ webhook.name }}"
match:
severity: page
{% endfor %}
# The following inhibit rules are meant to work both with the job/host # The following inhibit rules are meant to work both with the job/host
# hierarchy (for standard metrics) and with the probe/target one (for # hierarchy (for standard metrics) and with the probe/target one (for
...@@ -61,15 +56,16 @@ inhibit_rules: ...@@ -61,15 +56,16 @@ inhibit_rules:
receivers: receivers:
- name: default - name: default
- name: 'alert-email' - name: alert
{% if alert_email %} {% if alert_email %}
email_configs: email_configs:
- to: '{{ alert_email }}' - to: '{{ alert_email }}'
{% endif %} {% endif %}
{% for webhook in alert_webhook_receivers | default([]) %} {% if alert_webhook_receivers | default([]) %}
- name: "{{ webhook.name }}"
webhook_configs: webhook_configs:
{% for webhook in alert_webhook_receivers %}
- url: "{{ webhook.url }}" - url: "{{ webhook.url }}"
send_resolved: {{ webhook.send_resolved | default(False) | to_json }} send_resolved: {{ webhook.send_resolved | default(False) | to_json }}
{% endfor %} {% endfor %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment