Compare commits
1 Commits
8529033bc4
...
98d3a918bd
Author | SHA1 | Date | |
---|---|---|---|
98d3a918bd |
@ -15,8 +15,14 @@ func HandleAlertmanagerPayloadPost(c *fiber.Ctx) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Println("Got alertmanager payload")
|
||||||
|
|
||||||
for _, alert := range payload.Alerts {
|
for _, alert := range payload.Alerts {
|
||||||
message := ""
|
message := ""
|
||||||
|
|
||||||
|
fmt.Printf("Status - %s", alert.Status)
|
||||||
|
fmt.Printf("Severity - %s", alert.Labels["severity"])
|
||||||
|
|
||||||
if alert.Status == "firing" {
|
if alert.Status == "firing" {
|
||||||
switch alert.Labels["severity"] {
|
switch alert.Labels["severity"] {
|
||||||
case "warning":
|
case "warning":
|
||||||
|
Loading…
Reference in New Issue
Block a user