Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setting custom alert details via .details() in PagerDuty v2 #2081

Closed
ono760 opened this issue Oct 23, 2018 · 4 comments
Closed

Support setting custom alert details via .details() in PagerDuty v2 #2081

ono760 opened this issue Oct 23, 2018 · 4 comments
Assignees
Milestone

Comments

@ono760
Copy link

ono760 commented Oct 23, 2018

PagerDuty v1 supports setting custom details for the alert via .details(<string>) This allows me to add more details there, including links to charts of the issue and/or information about solving the problem. This was added to PagerDuty v1 in August last year (#1512), but for some reason it doesn't seem that it was included in PagerDuty v2. PagerDuty v2 implementation doesn't set the details properly.

Usually, I see 'Event object is invalid' errors due to failures in the template rendering. It appears the template isn't rendering and is just showing as an empty string. PagerDuty is rejecting this because the details field in Kapacitor maps the summary field of PagerDuty.

If I switch the .details() value to a non-templated value it works correctly.

@rbetts rbetts added this to the 1.5.2 milestone Nov 21, 2018
@nathanielc
Copy link
Contributor

I am looking into this issue. Can you share a TICKscript with an example of what you are trying to do? The reason v2 doesn't support details like v1 is because the v2 pager duty API support arbitrary JSON so all the details are already on the alert event in pager duty with v2 and so using the .details template should not have been necessary. What is your use case where you need the template in addition to all the details already on the alert event?

@rbetts
Copy link

rbetts commented Nov 27, 2018

Is #1961 (comment) different from this issue?

@nathanielc
Copy link
Contributor

@rbetts Maybe? It depends on the use case that drives this request. The work in #1961 looks like a good addition regardless of how .details are handled.

@nathanielc
Copy link
Contributor

I heard back from the original use case that triggered this feature request. The use case is to add links to the pager duty alerts. The PR here #1940 will definitely solve this issue and does so using the correct PagerDuty API calls instead of opaque details.

Closing since #1940 has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants