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

Add Link/Button to Alert Group Details #5317

Open
x82423990 opened this issue Dec 2, 2024 · 2 comments
Open

Add Link/Button to Alert Group Details #5317

x82423990 opened this issue Dec 2, 2024 · 2 comments

Comments

@x82423990
Copy link

What would you like to see!

Feature Request: Add a Button or Link to Alert Group Details in Slack Notifications 🙏

Background

Currently, when we receive Slack notifications for alerts, there’s no direct way to jump to the corresponding Alert Group detail page. We have to manually navigate through the UI, which is time-consuming—especially during on-call shifts.

It would be super helpful if Slack messages could include a button or link that takes us straight to the Alert Group details.


What We Need

  1. A Button in Slack Notifications
    Add a button (e.g., View Details) that links to the Alert Group detail page:
    https://example.com/alert-group/<group_id>

  2. Support for Variables in Templates
    Alternatively, allow variables like web_link or group_id in the Slack message template so we can manually craft the link.


Why This Matters

  • Saves Time: Direct access to Alert Group details improves efficiency.
  • Faster Incident Response: Especially critical during high-pressure situations.
  • Better Usability: A small change that makes a big difference for on-call engineers.

Thank You!

If this feature is possible, it would be a game-changer for us. And if there’s already a way to do this, please point us in the right direction. Thanks for all your hard work on OnCall! 🙌

Product Area

Alert Flow & Configuration

Anything else to add?

No response

Copy link
Contributor

github-actions bot commented Dec 2, 2024

The current version of Grafana OnCall, at the time this issue was opened, is v1.13.5. If your issue pertains to an older version of Grafana OnCall, please be sure to list it in the PR description. Thank you 😄!

@updogliu
Copy link

updogliu commented Dec 3, 2024

The slack plugin already has the link, which isself.alert_group.web_link, but currently only shows when the alerts_count of the group is larger than 1. So adding an always-showing "Alert Group" link or button shouldn't take much work. Wish to see it!

    def render_alert_group_blocks(self) -> Block.AnyBlocks:
        blocks: Block.AnyBlocks = self.alert_renderer.render_alert_blocks()
        alerts_count = self.alert_group.alerts.count()
        if alerts_count > 1:
            text = (
                f":package: Showing the last alert only out of {alerts_count} total. "
                f"Visit <{self.alert_group.web_link}|the plugin page> to see them all."
            )
            blocks.append({"type": "context", "elements": [{"type": "mrkdwn", "text": text}]})
        return blocks

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

2 participants