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 go templating in alerting #709

Open
jetersen opened this issue Mar 19, 2024 · 2 comments
Open

Support go templating in alerting #709

jetersen opened this issue Mar 19, 2024 · 2 comments
Labels
feature New feature or request

Comments

@jetersen
Copy link

Describe the feature request

Would be nice instead of place holders if we could support full go templating in the alert providers if not all but at least the custom provider.

So we can do conditional logic and provide full templating.

https://pkg.go.dev/text/template

Why do you personally want this feature to be implemented?

All I want from our slack alert is to be able to include the URL for instance if status code is 500. Or I could template out the response body into the alert message.

How long have you been using this project?

2 weeks

Additional information

Would be willing to implement this myself.

@TwiN
Copy link
Owner

TwiN commented Mar 23, 2024

Any chance you could show me an example of how it would look in the configuration?

@TwiN TwiN added the feature New feature or request label Mar 23, 2024
@jetersen
Copy link
Author

Here is an example of how alert manager configures their slack notification via templates:
https://hodovi.cc/blog/creating-awesome-alertmanager-templates-for-slack/

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

No branches or pull requests

2 participants