Template secret keys for pagerduty notifier (#1168) (#1182)

The tmpl() call was removed when migrating to
support pd v2 events api.
This commit is contained in:
stuart nelson 2018-01-08 13:41:10 +01:00 committed by GitHub
parent 3c61fe3fef
commit 3aa7f03b10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -468,7 +468,7 @@ type pagerDutyPayload struct {
func (n *PagerDuty) notifyV1(ctx context.Context, eventType, key string, tmpl func(string) string, details map[string]string, as ...*types.Alert) (bool, error) {
msg := &pagerDutyMessage{
ServiceKey: string(n.conf.ServiceKey),
ServiceKey: tmpl(string(n.conf.ServiceKey)),
EventType: eventType,
IncidentKey: hashKey(key),
Description: tmpl(n.conf.Description),
@ -514,7 +514,7 @@ func (n *PagerDuty) notifyV2(ctx context.Context, eventType, key string, tmpl fu
}
msg := &pagerDutyMessage{
RoutingKey: string(n.conf.RoutingKey),
RoutingKey: tmpl(string(n.conf.RoutingKey)),
EventAction: eventType,
DedupKey: hashKey(key),
Payload: payload,