influxdata / influxdata/kapacitor
Allow user to set client_url in pagerduty2 events
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Currently events sent to PagerDuty via the v2 API set the `client` and `client_url` fields like this:
https://github.com/influxdata/kapacitor/blob/e6bc51b8447de450c3f6fc0f6e47b6a0987ce5b6/services/pagerduty2/service.go#L318-L319
PagerDuty uses the `client_url` as a clickable link when integrating with other services like Slack. The `client_url` field should really provide additional context for an event, like a link to a dashboard.
Currently the `client_url` field is hardcoded to the host and port the http service for Kapacitor is running on, typically `http://[::]:9092/kapacitor/v1`. This isn't useful to someone receiving an alert via PagerDuty.
It would be good to allow users to set the `client_url` field to something relevant to the alert being triggered in both the event handler and TICKscript for PagerDuty.
The `client` and `client_url` fields are used in the v2 version of PagerDuty's API, but they are inherited from v1:
https://v2.developer.pagerduty.com/docs/trigger-events
https://v2.developer.pagerduty.com/docs/send-an-event-events-api-v2
Contributor guide
Research direction
Start at services/pagerduty2/service.go around lines 318-319 and trace how PagerDuty events are configured through the event handler and TICKscript. Done means users can provide an alert-relevant client_url through both paths and the value is sent in PagerDuty v2 events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100