-
Notifications
You must be signed in to change notification settings - Fork 43
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
ruleURL should open the alert rule page and not list the rules, previously it used to open the dashboard #96
Comments
This seems to have been done intentionally at the beginning of unified alerting grafana/grafana#33739. In legacy alerting it points to the dashboard panel https://github.com/grafana/grafana/blob/40feee0d17c72421bfd0e9dc5deebc83f7e3bb68/pkg/services/alerting/notifiers/slack.go#L212 |
Is there a way to pass it as a config var ? Maybe Something like slackTitleURL or can we modify this behaviour using notifications templates? |
The reason for that behavior is that unified alerting notification component (Alertmanager) supports grouping alerts by labels, and therefore integration can receive multiple alerts alerting/receivers/slack/slack.go Lines 286 to 290 in 793c672
Therefore, it is not clear to which alert rule the slack message should refer to. |
Unfortunately, I do not see any way you can change that URL. We can make it configurable, though and use the current behavior as the default. Alternative is to check if there is one alert in the group and create proper URL to the rule |
Yes, currently we have single alert in the group as we migrated from the legacy alerts I tried grouping the alerts using group overrides in notifications policy and now ruleURL value does make sense, the only way currently I see to access alert is through notification templates Though it would be really handy if we could also config slack title url. |
I also ran into this. We currently have all our slack alerts ungrouped so this would be amazing! |
There is a work around for this. If you format a title in the slack link format:
It will override the |
This is done for Slack but might happen for other messages, leaving this issue open. |
https://github.com/grafana/alerting/blob/793c67215ba14d6515b93707caeb7e6d9bf82189/receivers/slack/slack.go#LL290C90-L290C90
The text was updated successfully, but these errors were encountered: