Skip to content

Commit

Permalink
feat: use alert_name for slack and pagerduty notification (#32)
Browse files Browse the repository at this point in the history
* feat: use alert_name for slack and pagerduty notification

* fix: template message receiver formatting

---------

Co-authored-by: Manish Dangi <[email protected]>
Co-authored-by: Muhammad Abduh <[email protected]>
  • Loading branch information
3 people authored Oct 19, 2023
1 parent cd90feb commit 33dd04f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ event_type: "[[template "pagerduty.event_type" . ]]"
description: ([[ .Data.status | toUpper ]][[ if eq .Data.status "firing" ]]:[[ .Data.num_alerts_firing ]][[ end ]])
[[- if eq .Data.status "resolved" ]] ~([[ .Labels.severity | toUpper ]])~
[[- else ]] *([[ .Labels.severity | toUpper ]])*
[[- end]] [[ .Labels.alertname ]]
[[- end]] [[ if .Labels.alert_name ]][[.Labels.alert_name]][[else]][[.Labels.alertname]][[end]]
client: Siren
details:
Labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[[- template "__alert_severity_prefix_emoji" . ]] ([[ .Data.status | toUpper ]][[ if eq .Data.status "firing" ]]:[[ .Data.num_alerts_firing ]][[ end ]])
[[- if eq .Data.status "resolved" ]] ~([[ .Labels.severity | toUpper ]])~
[[- else ]] *([[ .Labels.severity | toUpper ]])*
[[- end]] [[ .Labels.alertname ]]
[[- end]] [[ if .Labels.alert_name ]][[.Labels.alert_name]][[else]][[.Labels.alertname]][[end]]
[[- end ]]
[[- define "slack.color" -]]
[[- if eq .Data.status "firing" -]]
Expand Down

0 comments on commit 33dd04f

Please sign in to comment.