Support OpsGenie Priority field (#1094)

This commit is contained in:
Tom Fawcett 2017-11-12 17:01:19 +00:00 committed by stuart nelson
parent 7151cd4bfc
commit fd0ace8d88
2 changed files with 3 additions and 0 deletions

View File

@ -308,6 +308,7 @@ type OpsGenieConfig struct {
Teams string `yaml:"teams,omitempty" json:"teams,omitempty"`
Tags string `yaml:"tags,omitempty" json:"tags,omitempty"`
Note string `yaml:"note,omitempty" json:"note,omitempty"`
Priority string `yaml:"priority,omitempty" json:"priority,omitempty"`
// Catches all undefined fields and must be empty after parsing.
XXX map[string]interface{} `yaml:",inline" json:"-"`

View File

@ -792,6 +792,7 @@ type opsGenieCreateMessage struct {
Teams string `json:"teams,omitempty"`
Tags string `json:"tags,omitempty"`
Note string `json:"note,omitempty"`
Priority string `json:"priority,omitempty"`
}
type opsGenieCloseMessage struct {
@ -843,6 +844,7 @@ func (n *OpsGenie) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
Teams: tmpl(n.conf.Teams),
Tags: tmpl(n.conf.Tags),
Note: tmpl(n.conf.Note),
Priority: tmpl(n.conf.Priority),
}
}
if err != nil {