Added some debugging

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2021-12-05 14:02:29 +00:00
parent fe5425ca50
commit 98d3a918bd
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -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":