2017-05-30 111 views
0

我有Alertmanager和Prometheus在Openshift中運行。 Alertmanager接收和顯示來自普羅米修斯的警報,但與任何SMTP服務器發送時,它(我使用Gmail現在但我想其他人),我收到以下錯誤:AlertManager在Openshift中運行時不能發送郵件(錯誤:getsockopt:連接超時)

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"

我有一個config.yml其工作時,我通過alertmanager和prometheus在本地嘗試。我收到了電子郵件提醒,所以我不明白爲什麼它在Openshift中運行時不起作用。我用完了想法。

我的配置文件:

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]' 

回答

0

解決。問題在於防火牆配置阻止了傳出的請求。