0
votes

I have Alertmanager and Prometheus running in Openshift. Alertmanager receives and shows the alerts from Prometheus but when sending it with any smtp server (I'm using Gmail now but I tried others), I get the following error:

time="2017-05-30T08:47:21Z" level=error msg="Notify for 1 alerts failed: dial tcp 74.125.206.109:587: getsockopt: connection timed out" source="dispatch.go:261"

I have a config.yml which worked when I tried it locally with alertmanager and prometheus. I received the email alerts, so I dont get why it doesn't work when running in Openshift. I ran out of ideas.

My config file:

global:
      smtp_smarthost: 'smtp.gmail.com:587'
      smtp_from: '[email protected]'
      smtp_auth_username: '[email protected]'
      smtp_auth_password: 'ABCD1234'

    templates: 
    - '/etc/alertmanager/template/*.tmpl'

      group_by: ['alertname', 'cluster', 'service']
      group_wait: 1m
      group_interval: 1m
      repeat_interval: 1m 

      receiver: team-X-mails
      routes:

      - match:
          severity: page
        receiver: team-X-mails
    receivers:
    - name: 'team-X-mails'
      email_configs:
      - to: '[email protected]'
1

1 Answers

0
votes

Solved. The problem was a firewall configuration which was blocking the outgoing requests.