从Alertmanager触发的Pagerduty事件描述中填充当前时间

时间:2019-04-11 06:42:40

标签: time alert prometheus-alertmanager pagerduty

我在解决以下问题。它也在这里列出:https://github.com/prometheus/alertmanager/issues/1587

When triggering multiple alerts via the API and those alerts get grouped,
only the alert summary gets updated, and subsequent messages get logged. 
The alert details are not updated (it still reflects the original message and summary). 
At this time, you have to click through the detailed log to see each 
individual API message sent from AlertManager.

要解决此问题,我正在尝试在Pagerduty事件的描述中添加当前时间(或者我们可以添加随机ID),假设pagerduty将事件描述作为事件键。

下面是alertmanager.yml

receivers:
- name: 'Pager'
pagerduty_configs:
- service_key: 'xxxxxxxxxxxxx'
description: '{{ template "pagerduty.default.description" .}}'

我是Alertmanager和Golang的新手,因此很难尝试一下。非常感谢在PD事件描述中添加时间/ random_ID的任何帮助或建议。

0 个答案:

没有答案