Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26e202f817
|
+1
-5
@@ -16,13 +16,9 @@ func HandleAlertmanagerPayloadPost(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
fmt.Println("Got alertmanager payload")
|
||||
|
||||
fmt.Println(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":
|
||||
|
||||
Reference in New Issue
Block a user