簡體   English   中英

使用prometheus-alertmanager通過Grafana UI發送警報電子郵件

[英]Sending Alert emails through Grafana UI using prometheus-alertmanager

我正在嘗試使用prometheus-alertmanager通知通道通過grafana UI測試發送電子郵件警報。 我已在alertmanager的配置文件中添加了stmp詳細信息。 當我嘗試測試時,它說電子郵件已發送,但實際上沒有任何反應。 當我將相同的電子郵件配置添加到grafana.ini文件並在UI中添加電子郵件通知通道時,便能夠發送測試通知。 我正在使用以下頭盔圖表進行安裝-> https://github.com/helm/charts/tree/master/stable/prometheus-operator這是alertmanager配置文件。

  config:
    global:
      resolve_timeout: 5m
      smtp_smarthost: 'email-smtp.us-east-1.amazonaws.com:587'
      smtp_from: 'redacted'
      smtp_auth_username: 'redacted'
      smtp_auth_password: 'redacted'

route:
  group_by: ['job']
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 12h
  receiver: 'null'
  routes:
  - match:
      alertname: DeadMansSwitch
    receiver: 'null'
receivers:
- name: 'null'

這是grafana日志。

t=2019-01-28T16:57:38+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/ status=302 remote_addr=127.0.0.1 time_ms=0 size=29 referer=
t=2019-01-28T16:59:07+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/alerts/test status=422 remote_addr=127.0.0.1 time_ms=36 size=82 referer="http://localhost:8000/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-compute-resources-pod?refresh=10s&panelId=0&fullscreen&edit&orgId=1&tab=alert"
t=2019-01-28T16:59:56+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/alerts/test status=422 remote_addr=127.0.0.1 time_ms=37 size=82 referer="http://localhost:8000/d/a6e7d1362e1ddbb79db21d5bb40d7137/k8s-use-method-cluster?refresh=10s&panelId=0&fullscreen&edit&orgId=1&tab=alert"
t=2019-01-28T17:01:30+0000 lvl=info msg="Sending Alertmanager alert" logger=alerting.notifier.prometheus-alertmanager ruleId=0 notification=Alert
t=2019-01-28T17:02:30+0000 lvl=info msg="Sending Alertmanager alert" logger=alerting.notifier.prometheus-alertmanager ruleId=0 notification=Alert
t=2019-01-28T17:06:40+0000 lvl=info msg="Sending Alertmanager alert" logger=alerting.notifier.prometheus-alertmanager ruleId=0 notification=Alert

我在這里做錯了什么?

Prometheus AlertManager的日志輸出丟失。 如果警報管理器配置已滿,那么您將在此之后再錯過2行

  • 名稱:“ null”
email_configs:
  - to: 'myemail@test.com'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM