alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

alertmanager.yml: How to use- SMTP_AUTH_USERNAME SMTP_AUTH_PASSWORD?

Open mokshpooja opened this issue 10 years ago • 4 comments

Moved to the latest syle of yaml for alert manager and building from master. But I am not receiving any email notifications. Also I have noticied that although I can see the alerts on prometheus side I cannot see the alerts on the alertmanager alert page.

Is the below use of SMTP_AUTH_USERNAME SMTP_AUTH_PASSWORD wrong?

global:
 resolve_timeout: 5m
  # The smarthost and SMTP sender used for mail notifications.
 smtp_smarthost: smtp.gmail.com:587
 smtp_from: [email protected]
 SMTP_AUTH_USERNAME: [email protected]
 SMTP_AUTH_PASSWORD: sender_password

route:
  group_by: [alertname]
  repeat_interval: 1h 
  receiver: live-monitoring

receivers:
- name: live-monitoring
  email_configs:
  - to: [email protected] 

mokshpooja avatar Apr 27 '16 13:04 mokshpooja

Hi @mokshpooja

Yes, they should be lowercase.

mpchadwick avatar Apr 27 '16 13:04 mpchadwick

@mpchadwick thanks for the reply! do you know why might the alerts not been showing up on the alertmanager alert page? I have group_by: [alertname]

mokshpooja avatar Apr 27 '16 13:04 mokshpooja

You specified the alert manager endpoint when starting prometheus right? If so I can't see a reason. You could try running alert manager in debug mode which will give you some more feedback in the console about what is going on.

mpchadwick avatar Apr 27 '16 13:04 mpchadwick

http://www.robustperception.io/sending-email-with-the-alertmanager-via-gmail/ has an example of how to do gmail config.

brian-brazil avatar Apr 27 '16 19:04 brian-brazil