Skip to content

The issue of excessive error log output when multi-notification configuration matching fails in the notification rules, and the desire to support default notification configuration #2871

@shizhice

Description

@shizhice

环境:
夜莺版本:8.0+

问题说明:
在 v8.0+ 版本中,当“通知规则”配置了多个“通知配置”并设置了“适用标签”时,若其中某一个通知配置的标签匹配失败,系统会在日志中打印一条 error 级别的日志。

该行为导致在正常业务场景下(部分配置不匹配是预期行为),日志中出现大量误报的 error 日志,干扰问题排查,影响日志可读性。

代码:
alert/dispatch/dispatch.go:221
alert/dispatch/dispatch.go:360

期望:

  1. 仅在所有通知配置均未匹配成功时,才应记录 error 级别日志,表明此次通知无目标接收方。
  2. 建议引入“缺省通知配置(default notification config)”功能:当没有任何通知配置的标签匹配成功时,自动使用“缺省配置”进行通知推送,确保关键告警不会遗漏。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions