mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-31 18:51:53 +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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status := "unknown"
|
||||||
|
switch op {
|
||||||
|
case notificationOpTrigger:
|
||||||
|
status = "firing"
|
||||||
|
case notificationOpResolve:
|
||||||
|
status = "resolved"
|
||||||
|
}
|
||||||
|
alertname := html.EscapeString(a.Labels["alertname"])
|
||||||
|
|
||||||
// Send pushover message
|
// Send pushover message
|
||||||
_, _, err = po.Push(&pushover.Message{
|
_, _, err = po.Push(&pushover.Message{
|
||||||
Title: a.Summary,
|
Title: fmt.Sprintf("%s: %s", alertname, status),
|
||||||
Message: a.Description,
|
Message: a.Summary,
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user