Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple email receivers in prometheus alertmanager "to" field

How can I create a receiver configuration with multiple email addresses in the "to" field?

like image 849
eventhorizon Avatar asked Dec 21 '17 08:12

eventhorizon


People also ask

How does Prometheus send alerts to Alertmanager?

Alerting rules in Prometheus servers send alerts to an Alertmanager. The Alertmanager then manages those alerts, including silencing, inhibition, aggregation and sending out notifications via methods such as email, on-call notification systems, and chat platforms.

What is Alertmanager receiver?

The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.

How do I set up email alerts on Prometheus?

Configure Alertmanageryml file by adding the location of our Alertmanager. Under alerting field we add our Alertmanager target and we need to restart the Prometheus service for the updated configurations to take effect and we can see the Alertmanager in our Prometheus dashboard under the status tab.


2 Answers

You can put comma separated email addresses in the to field.

to: '[email protected], [email protected]'

like image 100
brian-brazil Avatar answered Oct 05 '22 03:10

brian-brazil


For prometheus 1.8 I am using two "to" configurations in the same receiver.

receivers:

  - name: 'bla1-and-bla2-mails'
    email_configs:
    - to: '[email protected]' 
      from: '[email protected]'
      require_tls: false
      send_resolved: true
    - to: '[email protected]'
      from: '[email protected]'
      require_tls: false
      send_resolved: true
like image 20
Shell_Leko Avatar answered Oct 05 '22 04:10

Shell_Leko