From 7d05e6afcb47c5b5bb961aa569c5df28c6e8fcf7 Mon Sep 17 00:00:00 2001 From: Ildar Iskhakov Date: Wed, 11 Sep 2024 21:24:17 +0800 Subject: [PATCH] Change default source link template for alertmanager (#5005) # What this PR does Changing source link default template to the link to the first alert in the group `alerts[0].generatorURL`. `externalURL` as a backlink to the Alertmanager, is too general ## Which issue(s) this PR closes Related to [issue link here] ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --- engine/config_integrations/alertmanager.py | 2 +- engine/config_integrations/grafana_alerting.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/config_integrations/alertmanager.py b/engine/config_integrations/alertmanager.py index 6f695d4dbe..2df1d9bc55 100644 --- a/engine/config_integrations/alertmanager.py +++ b/engine/config_integrations/alertmanager.py @@ -13,7 +13,7 @@ # Behaviour -source_link = "{{ payload.externalURL }}" +source_link = "{{ payload.alerts[0].generatorURL }}" grouping_id = "{{ payload.groupKey }}" diff --git a/engine/config_integrations/grafana_alerting.py b/engine/config_integrations/grafana_alerting.py index 3209a0fc0d..0dc5b6d6f1 100644 --- a/engine/config_integrations/grafana_alerting.py +++ b/engine/config_integrations/grafana_alerting.py @@ -15,7 +15,7 @@ # Behaviour -source_link = "{{ payload.externalURL }}" +source_link = "{{ payload.alerts[0].generatorURL }}" grouping_id = "{{ payload.groupKey }}"