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 a custom annotation key as text description for an alert #1845

Open
cropalato opened this issue May 8, 2023 · 3 comments
Open

Support a custom annotation key as text description for an alert #1845

cropalato opened this issue May 8, 2023 · 3 comments
Labels
question Further information is requested

Comments

@cropalato
Copy link

Is your feature request related to a problem? Please describe.
Prometheus webhook adds Alert description based on a fixed sequence of possible annotations
text = description or summary or f'{severity.upper()}: {resource} is {event}'

Describe the solution you'd like
Should be nice to have an environmental variable to override that sequence with a specific annotation like PROMETHEUS_TEXT_KEY.

@satterly
Copy link
Member

satterly commented Jun 25, 2023

What is an example of a "text key" that you would want to use instead of "description" or "summary"? And why?

@satterly satterly added the question Further information is requested label Jun 25, 2023
@cropalato
Copy link
Author

I had a situation where I would like to use summary, but it was using description, the or condition creates a precedence.
I can see other situations where I prefer to use a label from my metric and/or my alert rule.
Making that short, the variable could add more flexibility and you are already using env variables to override hardcoded configuration.

@cropalato
Copy link
Author

@satterly Did I answer your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants