Email notification doesn't Work

28 views
Skip to first unread message

Frederic Arnould

unread,
Jun 11, 2020, 6:19:27 AM6/11/20
to Prometheus Users
Hello, 

Somebody could check my configuration ?
My postfix works correctly, but not mails in my prometheus container.

[root@admin-toto ~]# docker exec -it monitor_prometheus sh

/prometheus # cat alertmanager.yml
global:
  resolve_timeout: 5m
  smtp_smarthost: 10.10.10.10
  smtp_from: al...@alertmanager.com
  smtp_require_tls: false
route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 4h
  receiver: 'team-admin'
receivers:
- name: 'team-admin'
  email_configs:
  - to: 'frederic...@toto.com
#inhibit_rules:
#  - source_match:
#      severity: 'critical'
#    target_match:
#      severity: 'warning'
#    equal: ['alertname', 'job', 'instance']


Thanks by advance 
Regards

Frederic Arnould

unread,
Jun 16, 2020, 5:11:37 PM6/16/20
to Prometheus Users
Nobody can help me ?

Shivam Soni

unread,
Jun 17, 2020, 3:25:37 AM6/17/20
to Prometheus Users
Use this it will definitely work


route:
  group_by: [Alertname]
  # Send all notifications to me.
  receiver: email-me

receivers:
- name: email-me
  email_configs:
  - to: ReciverMailId
    from: Sendermailid
    smarthost: smtp.gmail.com:587
    auth_username: "sen...@gmail.com"
    auth_identity: "sen...@gmail.com"
    auth_password: "pwd"


On Thursday, June 11, 2020 at 5:19:27 PM UTC+7, Frederic Arnould wrote:
Hello, 

Somebody could check my configuration ?
My postfix works correctly, but not mails in my prometheus container.

[root@admin-toto ~]# docker exec -it monitor_prometheus sh

/prometheus # cat alertmanager.yml
global:
  resolve_timeout: 5m
  smtp_smarthost: 10.10.10.10
  smtp_from: al...@alertmanager.com
  smtp_require_tls: false
route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 4h
  receiver: 'team-admin'
receivers:
- name: 'team-admin'
  email_configs:
  - to: 'frederi...@toto.com

#inhibit_rules:
#  - source_match:
#      severity: 'critical'
#    target_match:
#      severity: 'warning'
#    equal: ['alertname', 'job', 'instance']


Thanks by advance 
Regards
Reply all
Reply to author
Forward
0 new messages