Skip to content

Commit 3aa7f03

Browse files
Template secret keys for pagerduty notifier (prometheus#1168) (prometheus#1182)
The tmpl() call was removed when migrating to support pd v2 events api.
1 parent 3c61fe3 commit 3aa7f03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notify/impl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ type pagerDutyPayload struct {
468468
func (n *PagerDuty) notifyV1(ctx context.Context, eventType, key string, tmpl func(string) string, details map[string]string, as ...*types.Alert) (bool, error) {
469469

470470
msg := &pagerDutyMessage{
471-
ServiceKey: string(n.conf.ServiceKey),
471+
ServiceKey: tmpl(string(n.conf.ServiceKey)),
472472
EventType: eventType,
473473
IncidentKey: hashKey(key),
474474
Description: tmpl(n.conf.Description),
@@ -514,7 +514,7 @@ func (n *PagerDuty) notifyV2(ctx context.Context, eventType, key string, tmpl fu
514514
}
515515

516516
msg := &pagerDutyMessage{
517-
RoutingKey: string(n.conf.RoutingKey),
517+
RoutingKey: tmpl(string(n.conf.RoutingKey)),
518518
EventAction: eventType,
519519
DedupKey: hashKey(key),
520520
Payload: payload,

0 commit comments

Comments
 (0)