mirror of https://github.com/grafana/grafana.git
Merge branch 'patch-1' of https://github.com/devkid/grafana into devkid-patch-1
* 'patch-1' of https://github.com/devkid/grafana: Add default message for Pushover notifications
This commit is contained in:
commit
f36aa2e953
|
|
@ -133,6 +133,7 @@ func (this *PushoverNotifier) Notify(evalContext *alerting.EvalContext) error {
|
|||
this.log.Error("Failed get rule link", "error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
message := evalContext.Rule.Message
|
||||
for idx, evt := range evalContext.EvalMatches {
|
||||
message += fmt.Sprintf("\n<b>%s</b>: %v", evt.Metric, evt.Value)
|
||||
|
|
@ -146,6 +147,9 @@ func (this *PushoverNotifier) Notify(evalContext *alerting.EvalContext) error {
|
|||
if evalContext.ImagePublicUrl != "" {
|
||||
message += fmt.Sprintf("\n<a href=\"%s\">Show graph image</a>", evalContext.ImagePublicUrl)
|
||||
}
|
||||
if message == "" {
|
||||
message = "Nothing to see here! (Set a notification message to replace this text.)"
|
||||
}
|
||||
|
||||
q := url.Values{}
|
||||
q.Add("user", this.UserKey)
|
||||
|
|
|
|||
Loading…
Reference in New Issue