Fix OpsGenie Tags field (#1108)

This commit is contained in:
Tom Fawcett 2017-11-15 22:20:02 +00:00 committed by stuart nelson
parent 291fc5722b
commit 8bfbb0a1aa

View File

@ -790,7 +790,7 @@ type opsGenieCreateMessage struct {
Details map[string]string `json:"details"`
Source string `json:"source"`
Teams []map[string]string `json:"teams,omitempty"`
Tags string `json:"tags,omitempty"`
Tags []string `json:"tags,omitempty"`
Note string `json:"note,omitempty"`
Priority string `json:"priority,omitempty"`
}
@ -846,7 +846,7 @@ func (n *OpsGenie) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
Details: details,
Source: tmpl(n.conf.Source),
Teams: teams,
Tags: tmpl(n.conf.Tags),
Tags: strings.Split(string(tmpl(n.conf.Tags)), ","),
Note: tmpl(n.conf.Note),
Priority: tmpl(n.conf.Priority),
}