Build URL for close alert request differently

This commit is contained in:
cglrkn 2017-10-03 15:13:05 +03:00 committed by GitHub
parent d8f6c73aab
commit ef518f6ecd

View File

@ -125,7 +125,7 @@ func (this *OpsGenieNotifier) closeAlert(evalContext *alerting.EvalContext) erro
body, _ := bodyJSON.MarshalJSON() body, _ := bodyJSON.MarshalJSON()
cmd := &m.SendWebhookSync{ cmd := &m.SendWebhookSync{
Url: fmt.Sprintf("%s/%s/close?identifierType=alias", opsgenieAlertURL,"alertId-"+strconv.FormatInt(evalContext.Rule.Id, 10)), Url: fmt.Sprintf("%s/alertId-%d/close?identifierType=alias", opsgenieAlertURL, evalContext.Rule.Id)
Body: string(body), Body: string(body),
HttpMethod: "POST", HttpMethod: "POST",
HttpHeader: map[string]string{ HttpHeader: map[string]string{