From 34fffdbfcc487d5de160027cd6a2c03f1c190e47 Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Sat, 18 Sep 2021 02:51:27 -0500 Subject: [PATCH] ughhhh --- pkg/prometheus/prometheus.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/prometheus/prometheus.go b/pkg/prometheus/prometheus.go index 52d8538..f40136f 100644 --- a/pkg/prometheus/prometheus.go +++ b/pkg/prometheus/prometheus.go @@ -71,7 +71,13 @@ func parsePrometheus(body []byte) []string { // Description : Clock on 10.234.62.22:9100 is not synchronising. Ensure NTP is configured on this host. var message []string for _, i := range reqBody.Alerts { - message = append(message, fmt.Sprintf("%s : %s\nInstance : %s\nSeverity : %s\nStarted : %s\nDescription : %s\n", i.Labels.Alertname, i.Status, + var emoji string // ugh + if i.Status == "resolved" { // what are you doing + emoji = "✅" // why + } else { // no + emoji = "🚨" // stop + } // cry + message = append(message, fmt.Sprintf("%s %s : %s\nInstance : %s\nSeverity : %s\nStarted : %s\nDescription : %s\n", emoji, i.Labels.Alertname, i.Status, i.Labels.Instance, i.Labels.Severity, i.StartsAt, i.Annotations.Description)) }