PrometheusAlert icon indicating copy to clipboard operation
PrometheusAlert copied to clipboard

告警聚合 firing 和resolved 同一时间触发 希望能拆分发送

Open devops-fj opened this issue 1 year ago • 5 comments

目前告警通知 和告警恢复 都到了触发条件 是 同时发送到一条信息 希望能可以 告警通知是一条消息 告警恢复是另一条消息

devops-fj avatar Mar 02 '23 06:03 devops-fj

目前告警通知 和告警恢复 都到了触发条件 是 同时发送到一条信息 希望能可以 告警通知是一条消息 告警恢复是另一条消息

兄弟有结果了吗,我也遇到了相同的问题

tcy110 avatar Jul 20 '23 02:07 tcy110

这个你可以在 alertmanager 配置文件里 route.group_by: 这里看看能不能实现, 按道理是可以的

route:
  receiver: 'notifications'
  # All alerts in a notification have the same value for these labels.
  group_by: [alertname, datacenter, app]

jicki avatar Jul 20 '23 03:07 jicki

这个你可以在 alertmanager 配置文件里 route.group_by: 这里看看能不能实现, 按道理是可以的

route:
  receiver: 'notifications'
  # All alerts in a notification have the same value for these labels.
  group_by: [alertname, datacenter, app]

你这里主要是通过alertname 这个做分组对吗?我这里是有配置这个的,不过还是没有拆分发送

tcy110 avatar Jul 20 '23 03:07 tcy110

这个你可以在 alertmanager 配置文件里 route.group_by: 这里看看能不能实现, 按道理是可以的

route:
  receiver: 'notifications'
  # All alerts in a notification have the same value for these labels.
  group_by: [alertname, datacenter, app]

你这里主要是通过alertname 这个做分组对吗?我这里是有配置这个的,不过还是没有拆分发送

我这个是官方的例子, 上面有注释呀.

你可以测试一下配置一个 alertname 相同的~是否会聚合在一起发送..

jicki avatar Jul 20 '23 09:07 jicki

这个你可以在 alertmanager 配置文件里 route.group_by: 这里看看能不能实现, 按道理是可以的

route:
  receiver: 'notifications'
  # All alerts in a notification have the same value for these labels.
  group_by: [alertname, datacenter, app]

你这里主要是通过alertname 这个做分组对吗?我这里是有配置这个的,不过还是没有拆分发送

我这个是官方的例子, 上面有注释呀.

你可以测试一下配置一个 alertname 相同的~是否会聚合在一起发送.

尝试过了 依旧会聚合在一起发送

tcy110 avatar Jul 20 '23 10:07 tcy110