Support OpsGenie Priority field (#1094)
This commit is contained in:
parent
7151cd4bfc
commit
fd0ace8d88
|
@ -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:"-"`
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue