Skip to content

Commit

Permalink
Template Source field in pagerduty payload
Browse files Browse the repository at this point in the history
As a sane default we link to alertmanager, but
leave templating available to the user if
something suits their system better.
  • Loading branch information
stuartnelson3 committed Nov 22, 2017
1 parent 3ba8d55 commit 813acfb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions notify/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,12 @@ func (n *PagerDuty) notifyV2(ctx context.Context, eventType, key string, tmpl fu
if eventType == pagerDutyEventTrigger {
payload = &pagerDutyPayload{
Summary: tmpl(n.conf.Description),
Source: tmpl(n.conf.Client),
Severity: n.conf.Severity,
CustomDetails: details,
Component: n.conf.Component,
Group: n.conf.Group,
}

if len(as) > 0 {
payload.Source = as[0].GeneratorURL
}
}

msg := &pagerDutyMessage{
Expand Down

0 comments on commit 813acfb

Please sign in to comment.