From 98d3a918bdc5e7ea1cb878af109936903a7f26d2 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sun, 5 Dec 2021 14:02:29 +0000 Subject: [PATCH] Added some debugging Signed-off-by: Marcus Noble --- alertmanager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/alertmanager.go b/alertmanager.go index a0ecc8b..5ea9220 100644 --- a/alertmanager.go +++ b/alertmanager.go @@ -15,8 +15,14 @@ func HandleAlertmanagerPayloadPost(c *fiber.Ctx) error { return err } + fmt.Println("Got alertmanager payload") + for _, alert := range payload.Alerts { message := "" + + fmt.Printf("Status - %s", alert.Status) + fmt.Printf("Severity - %s", alert.Labels["severity"]) + if alert.Status == "firing" { switch alert.Labels["severity"] { case "warning":