From b327574341e734f665d56e09436f5796fe5aedea Mon Sep 17 00:00:00 2001 From: Stylianos Rigas Date: Wed, 11 Sep 2024 17:30:39 +0300 Subject: [PATCH] CLD-8257 Add support for Ring name in Elrond notifications (#28) Co-authored-by: Stylianos Rigas --- elrond-notification/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elrond-notification/main.go b/elrond-notification/main.go index 76e483b..b9dd242 100644 --- a/elrond-notification/main.go +++ b/elrond-notification/main.go @@ -101,6 +101,7 @@ func handleRingWebhook(payload *elrond.WebhookPayload) error { } attach = *attach.AddField(mmField{Title: "Ring ID", Value: payload.ID, Short: true}) + attach = *attach.AddField(mmField{Title: "Ring Name", Value: payload.Name, Short: true}) attach = *attach.AddField(mmField{Title: "Type", Value: payload.Type, Short: true}) attach = *attach.AddField(mmField{Title: "New State", Value: payload.NewState, Short: true}) attach = *attach.AddField(mmField{Title: "Old State", Value: payload.OldState, Short: true}) @@ -206,7 +207,7 @@ func sendPagerDutyNotification(payload *elrond.WebhookPayload) error { tm := time.Unix(0, payload.Timestamp) alertReq := &pagerduty.V2Payload{ - Summary: fmt.Sprintf("%s - %s %s", payload.Type, payload.ID, payload.NewState), + Summary: fmt.Sprintf("%s - %s - %s %s", payload.Type, payload.ID, payload.Name, payload.NewState), Source: "Alarm System", Severity: "critical", Details: map[string]string{