Alert manager config

68 views
Skip to first unread message

Chrysale

unread,
Dec 30, 2024, 2:32:59 PM12/30/24
to Prometheus Users
This is my current alertmanager.yml config, but notifications sent out get sent to all emails added in the "to" section of the email configs. What changes can I make so that each receiver gets it's one individual alert? Note the "from" email is the same for both receivers.

global:
2 smtp_hello: '*******.net'
3
4 route:
5 group_wait: 1m
6 group_interval: 5m
7 repeat_interval: 12h
8 group_by: ["alertname", "severity"]
9 # Default receiver (for all alerts that don't match any specific route)
10 receiver: "gmail"
11
12 routes:
13 receiver: "gmail"
14 continue: true
15 receiver: "dev-receiver"
16
28 inhibit_rules:
29 - source_matchers:
30 - severity="critical"
31 target_matchers:
32 - severity="warning"
33 equal: ['alertname', 'instance']
34 routes: [{receiver: "gmail", continue: true}, {receiver: "dev-receiver"}]
35
36 receivers:
37 # Default receiver for other alerts
38 - name: "gmail"
39 email_configs:
40 - to: "*******.net, *******.net"
41 from: '*******.net'
42 smarthost: 'smtp-relay.gmail.com:587'
43 send_resolved: true

46 - name: "dev-receiver"
47 email_configs:
48 - to: '*******.net' # Send both EndpointDown and dev-team alerts to ctchako
49 from: '*******.net'
50 smarthost: 'smtp-relay.gmail.com:587'
51 send_resolved: true

Brian Candler

unread,
Dec 30, 2024, 3:40:19 PM12/30/24
to Prometheus Users
Please repost the config with correct formatting to make valid YAML: that is, with the correct horizontal indentation (which is critical), without the line numbers, and not in colour (the colons and brackets are white-on-white, making them invisible)
Reply all
Reply to author
Forward
0 new messages