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

Change PagerDuty's default summary text #4223

Closed
arikfr opened this issue Oct 7, 2019 · 2 comments · Fixed by #4239
Closed

Change PagerDuty's default summary text #4223

arikfr opened this issue Oct 7, 2019 · 2 comments · Fixed by #4239
Labels
Backend Feature: Alerts hacktoberfest Hacktoberfest Friendly Issues
Milestone

Comments

@arikfr
Copy link
Member

arikfr commented Oct 7, 2019

Currently PagerDuty's Alert destination default summary text uses the query id and name. We should change it to use the alert name as it's usually better explains what the alert is.

While #4153 implements ability to customize the summary text, it's good to have a saner default regardless.

(If #4153 is not merged before implementing, should be implemented based on its branch)

@arikfr arikfr added Backend hacktoberfest Hacktoberfest Friendly Issues Feature: Alerts labels Oct 7, 2019
@arikfr arikfr added this to the Next milestone Oct 7, 2019
@frextrite
Copy link
Contributor

Hi @arikfr
I believe

DESCRIPTION_STR = u'Alert - Redash Query #{query_id}: {query_name}'
this needs to be changed. However, I could not find any accessors of notify() function (maybe a problem with my IDE), so I was unable to find the alert object properties. Can I assume I can get the alert name by alert.name?

And also, I would have to change

default_desc = self.DESCRIPTION_STR.format(query_id=query.id, query_name=query.name)
to something like

self.DESCRIPTION_STR.format(alert_name=alert.name)

So can I assume, alert.name will always be non-null or do I need to involve checks?
Thanks!

@frextrite
Copy link
Contributor

So, I dug more and found a few examples of alert.name in redash/destination/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Feature: Alerts hacktoberfest Hacktoberfest Friendly Issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants