How can I create a receiver configuration with multiple email addresses in the "to" field?
Asked
Active
Viewed 1.8k times
2 Answers
45
You can put comma separated email addresses in the to
field.
to: 'user1@example.com, user2@example.com'

Community
- 1
- 1

brian-brazil
- 31,678
- 6
- 93
- 86
-
Im trying this but its not working receivers: - name: 'team-one-mails' email_configs: - to: 'bla1@bla.com', 'bla2@bla.com' from: 'prometheus@bla.com' require_tls: false send_resolved: true – Shell_Leko Nov 05 '18 at 05:10
-
@Shell_Leko instead of to: 'bla1@bla.com', 'bla2@bla.com'. Try the comma in the single quotes, so 'bla1@bla.com, bla2@bla.com'. This way the two emails will be passed as one string comma separated. – Andy Nov 15 '18 at 13:37
-
3That did not work for me. Only thing the work was using two "to" configurations. – Shell_Leko Nov 15 '18 at 23:46
12
For prometheus 1.8 I am using two "to" configurations in the same receiver.
receivers:
- name: 'bla1-and-bla2-mails'
email_configs:
- to: 'bla1@example.com'
from: 'prometheus@example.com'
require_tls: false
send_resolved: true
- to: 'bla2@example.com'
from: 'prometheus@example.com'
require_tls: false
send_resolved: true

Shell_Leko
- 512
- 5
- 13