diff --git a/alertmanager.go b/alertmanager.go index a0ecc8b..c0ae3b2 100644 --- a/alertmanager.go +++ b/alertmanager.go @@ -15,8 +15,16 @@ func HandleAlertmanagerPayloadPost(c *fiber.Ctx) error { return err } + fmt.Println("Got alertmanager payload") + fmt.Println(len(payload.Alerts)) + fmt.Println(payload.Alerts) + 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":