简体   繁体   English

使用prometheus-alertmanager通过Grafana UI发送警报电子邮件

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

I am trying to test sending email alerts through the grafana UI using the prometheus-alertmanager notification channel. 我正在尝试使用prometheus-alertmanager通知通道通过grafana UI测试发送电子邮件警报。 I have added the stmp details in the config file of the alertmanager. 我已在alertmanager的配置文件中添加了stmp详细信息。 When I try to test it says that the email has been sent but nothing really happens. 当我尝试测试时,它说电子邮件已发送,但实际上没有任何反应。 When I add the same email configuration to the grafana.ini file and add the email notification channel in the UI, I am able to send the test notification. 当我将相同的电子邮件配置添加到grafana.ini文件并在UI中添加电子邮件通知通道时,便能够发送测试通知。 I am using the following helm chart to install it - > https://github.com/helm/charts/tree/master/stable/prometheus-operator Here is the alertmanager config file. 我正在使用以下头盔图表进行安装-> 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'

This is the grafana log. 这是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

What am I doing wrong here ? 我在这里做错了什么?

The log output from Prometheus AlertManager is missing. Prometheus AlertManager的日志输出丢失。 If the alert manager config is full, then you miss 2 more lines after 如果警报管理器配置已满,那么您将在此之后再错过2行

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用配置文件使 Prometheus Alertmanager 静音? - How to silence Prometheus Alertmanager using config files? 将 alertmanager 添加到 istio prometheus - add alertmanager to istio prometheus prometheus 警报规则和配置 ui 工具? - prometheus alert rules and config ui tools? 普罗米修斯警报管理器配置未显示在 UI 中 - prometheus alert manager config not showing in UI 无法访问 Kube.netes Baremetall 上的 UI Grafana Prometheus - can't get access to UI Grafana Prometheus on Kubernetes Baremetall 在Prometheus Alertmanager上设置MicrosoftTeams通知 - Set MicrosoftTeams notification on Prometheus Alertmanager 用于检查 AlertManager 的错误 Prometheus 端点 - Error Prometheus endpoint for checking AlertManager 如何通过 Istion 入口网关访问 prometheus 和 grafana? 我已经通过 Helm 安装了 promethius anfd grafana - How to access the prometheus & grafana via Istion ingress gateway? I have installed the promethius anfd grafana through Helm Kubernetes(K8s)-在一段时间内未创建新容器时,从Prometheus / Grafana获取警报 - Kubernetes (K8s) - Get alert from Prometheus/Grafana when a new container is not created with a period of time Prometheus alertmanager在AWS上安装Helm失败 - Prometheus alertmanager installed failed with Helm on AWS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM