mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-19 12:40:49 +00:00
Merge pull request #64 from novilabs/pushover-status-notification
add status to pushover title
This commit is contained in:
commit
5b0e343ec4
@ -501,10 +501,19 @@ func (n *notifier) sendPushoverNotification(token string, op notificationOp, use
|
||||
return err
|
||||
}
|
||||
|
||||
status := "unknown"
|
||||
switch op {
|
||||
case notificationOpTrigger:
|
||||
status = "firing"
|
||||
case notificationOpResolve:
|
||||
status = "resolved"
|
||||
}
|
||||
alertname := html.EscapeString(a.Labels["alertname"])
|
||||
|
||||
// Send pushover message
|
||||
_, _, err = po.Push(&pushover.Message{
|
||||
Title: a.Summary,
|
||||
Message: a.Description,
|
||||
Title: fmt.Sprintf("%s: %s", alertname, status),
|
||||
Message: a.Summary,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user