mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-19 12:40:49 +00:00
add status to title, and Assume that the summary is the message, and that the alertname is a very short concise name for the alert
This commit is contained in:
parent
82ced0dc2a
commit
ac2e3be7b7
@ -444,10 +444,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