xiaoer2021 commented on issue #3697: URL: https://github.com/apache/hertzbeat/issues/3697#issuecomment-3219141231
#[回顾:配置完成监控规则后,模拟设备异常,钉钉一直重复发送告警,为什么不能设置成单次异常通知?否则钉钉报个错,群里消息一直响同一条错误。] @Duansg 好的,目前我们自行创建了一个通知模板: `## HertzBeat 告警通知 ### 告警信息 - 状态:${status} <#if commonLabels??> <#if commonLabels.severity??> - 告警级别:${commonLabels.severity?switch("critical","严重","warning","警告","info","提示","未知")} </#if> <#if commonLabels.alertname??> - 告警原因:${commonLabels.alertname} </#if> </#if> --- ### 详细信息 | 字段 | 值 | |------|-----| | 实例名称 | ${alert.labels.instancename!'-'} | | 服务/组件 | ${alert.labels.service!alert.labels.job!'-'} | | 触发IP | ${alert.labels.ip!'-'}<#if alert.labels.port??>:${alert.labels.port?number?int}</#if> | <#if alert.content?? && alert.content?trim != ""> | 告警详情 | ${alert.content} | </#if> --- ### 时间 | 字段 | 时间 | |------|------| | 首次触发 | ${(alert.startAt?number_to_datetime)?string("yyyy-MM-dd HH:mm:ss")} | <#if alert.activeAt??> | 最近触发 | ${(alert.activeAt?number_to_datetime)?string("yyyy-MM-dd HH:mm:ss")} | </#if> <#if alert.endAt??> | 恢复时间 | ${(alert.endAt?number_to_datetime)?string("yyyy-MM-dd HH:mm:ss")} | </#if> --- HertzBeat监控告警中心 ` 静默为空: <img width="1335" height="549" alt="Image" src="https://github.com/user-attachments/assets/7e976c3c-0fa4-43cd-b1c8-7b59a05723c7" /> 抑制为空: <img width="1205" height="407" alt="Image" src="https://github.com/user-attachments/assets/d0c28c2f-060d-4eff-9af6-c5f175e16787" /> 分组设置了这几个标签:alertname、host、service、severity、instance、job进行分组, <img width="973" height="631" alt="Image" src="https://github.com/user-attachments/assets/812a5ef4-d567-49e9-9e61-6d7b90309efb" /> 阈值规则为标准的,并没有什么额外的配置: <img width="1713" height="721" alt="Image" src="https://github.com/user-attachments/assets/50b6c101-3539-42cc-862f-b3fad1198ba8" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org