【发布时间】:2020-07-16 18:05:35
【问题描述】:
我们已经为我们的系统配置了基于 Prometheus 的警报,它运行良好。警报将发送到 Slack 和 Teams 中的特定渠道。为了生成票证和自动关闭票证(在已解决的消息上),我们为一个警报发送已解决状态。现在,支持人员正在查看主要松弛通道中的警报,他们不想在那里收到已解决的通知(主要用于自动关闭工单)。有什么方法可以将已解决的通知发送到另一个频道,而不是它发布警报的频道?
这是配置的摘录
- match_re:
component: 'platform'
receiver: 'slack-notifications-platform'
continue: false
- name: 'slack-notifications-platform'
slack_configs:
- send_resolved: true
api_url: 'https://hooks.slack.com/services/T091V/B8UHDTR/hfY66GDhwvRD5myKbZ88cva'
channel: '#telemetry_alerts_ops'
color: '{{ if eq .Status "resolved" }}good{{ else }}{{ if eq .CommonLabels.severity "minor"}}warning{{ else }}danger{{ end }}{{ end }}'
title: '{{ if gt (.Alerts.Firing | len) 0 }}[FIRING: {{ .Alerts.Firing | len }}]{{ end }}{{ if gt (.Alerts.Resolved | len) 0 }}[RESOLVED: {{ .Alerts.Resolved | len }}]{{ end }}{{ .GroupLabels.alertname }} ({{ .CommonLabels.severity }})'
text: '{{ template "slack.common.text" . }}'
【问题讨论】:
标签: prometheus prometheus-alertmanager