Slack integration for Grafana IRM
Note
The Grafana IRM Slack integration combines the features of the OnCall and Incident Slack apps into a single, unified Grafana IRM Slack app.
If you have an existing installation of the legacy Slack integrations, do not uninstall them. Refer to the migration instructions for more information.
The Grafana IRM Slack integration brings your incident response and on-call workflows directly into your Slack workspace, helping your team focus on alert resolution with less friction.
Key features and benefits
Integrating your Slack workspace allows users and teams to be notified of alerts directly in Slack with automated alert escalation steps and user notification preferences. Users can take a number of alert actions directly from Slack, including acknowledging and resolving alert groups, adding resolution notes, and more.
Refer to the following sections to learn more:
- Configure Escalation Chains with Slack notifications
- Configure user notification rules with Slack mentions
- Configure on-call shift notifications in Slack
When it comes to incidents, users can declare, collaborate on, and manage incident-worthy events without leaving Slack. They can also automatically create incident-specific channels, track the timeline of events, interact with incidents via Slash commands, and more.
Refer to the following sections to learn more:
- Create incident Slack channels
- Configure incident announcements
- Interact with incidents from Slack via Slash commands
Before you begin
To install the Grafana IRM Slack app, you must:
- Have an Admin role in Grafana IRM
- Be a Slack workspace Admin or Owner
- Allow Grafana IRM to access your Slack workspace
After the IRM Slack app has been added to your Slack workspace, Admins and Editors can configure escalation chains and other notifications to route to designated Slack channels.
In order to use the Slack slash command /grafana
, you must be an IRM user with a linked Slack account and necessary permissions.
To learn more, refer to Connect your Slack user to Grafana IRM.
Install the Grafana IRM Slack integration
The Grafana IRM Slack integration is installed and managed from the unified IRM app in Grafana Cloud. Installing the integration enables Slack notifications and incident collaboration features across all IRM workflows.
Follow these steps to install the Slack integration:
- In Grafana Cloud, open the main menu and navigate to Alerts & IRM > IRM > Integrations.
- Click the Apps tab and select the Slack IRM integration.
- Click Install integration.
- After being redirected to the Slack connection page, verify the Slack workspace is correct or Add another workspace.
- If needed, provide your Slack workspace URL and sign in with your Slack credentials.
- Follow the Slack prompts to review permissions and specify a default channel.
- Click Allow to give Grafana IRM permission to access your Slack workspace.
If you already have the legacy OnCall or Incident Slack integration installed, use the Migration guide to migrate your existing Slack configurations.
For more information about the required permissions, refer to the Permissions section.
Connect your Slack user to Grafana IRM
For users to gain full access to Grafana IRM functionality in Slack, follow these steps to map your Grafana IRM user account to your Slack user account:
- In Grafana Cloud, click your avatar and go to your Profile.
- Select the IRM tab.
- In the Slack connection section, click Open Slack connection page.
- Authorize your Slack account and follow the prompts to verify and link your Slack account.
After linking your Slack account, you can start using Grafana IRM in Slack in accordance with the role and permissions assigned to you in Grafana. The actions you can take in Slack depend on your permissions in Grafana IRM.
For more information on roles and permissions, refer to the Grafana Cloud user roles and permissions documentation.
Configure channels and notifications
Grafana IRM provides flexible configuration options to tailor Slack notifications to your team’s needs. This section outlines how to set up escalation chains, user notifications, on-call notifications, and incident channel settings within Slack.
Configure Escalation Chains with Slack notifications
After setting up your Slack integration, you can configure escalation chains to send notifications via Slack for firing alerts in Grafana IRM.
There are two Slack notification methods that can be integrated into escalation chains:
- Notify all members of a Slack channel
- Notify a specific Slack user group
To configure these in your escalation chains:
- In Grafana Cloud, navigate to Alerts & IRM > IRM > Escalation chains.
- Select an existing escalation chain or create a new one by clicking + Add escalation chain.
- Use the dropdown under Add escalation step to choose and configure your Slack notification preferences.
Configure user notification rules with Slack mentions
Before configuring Slack notifications, ensure you have connected your Slack account as described in Connect notification channels.
To configure Slack mentions for your notification rules:
- Go to your Grafana Cloud Profile.
- Select the IRM tab.
- Click Notification rules.
- Click + Add notification rule.
- Choose Slack mentions from the notification channel dropdown.
- Configure the remaining notification rule settings as needed.
If you don’t see Slack as an available notification channel in your user profile, it may be disabled by your organization administrator. For more information about notification channel visibility and management, refer to the Notification channel documentation.
Configure on-call shift notifications in Slack
The IRM Slack integration also supports automated notifications for on-call shifts, helping teams stay informed of their duties. Admins can set up these notifications in the Notification Preferences section:
- When an on-call shift notification is sent to a person or channel, click the gear icon to open Notifications preferences.
- Configure the notification behavior for future shifts according to your team’s preferences.
Configure Incident Slack channels
Configure the following incident-specific Slack channel settings to suit your organization’s process and preferences.
Incident channel creation
Customize when incident Slack channels are created to align with your organization’s workflows.
To configure incident channel creation:
- In Grafana Cloud, navigate to IRM > Integrations > Apps and select Slack IRM.
- Specify the following settings:
- Create Slack channel: Determine when to automatically create a Slack channel for an incident.
- Post updates to channel: Choose whether to automatically post incident updates to the created Slack channel.
- Invite users: Specify if users with an active role should be automatically invited to the incident channel.
Automatic channel archive
To maintain good Slack workspace hygiene, you can automatically archive resolved incident channels after a configurable number of days.
Consider a timeframe of 30-60 days to allow time for PIR, follow-ups, and stakeholder visibility.
To configure automatic channel archive:
- In Grafana Cloud, navigate to IRM > Integrations > Apps and select Slack IRM.
- Set the desired number of days after incident resolution for channels to automatically archive.
- Click Save settings.
Customize Slack channel prefixes
You can define custom channel prefixes to organize and identify incident channels more effectively.
To customize Slack channel prefixes:
- In Grafana Cloud, navigate to Alerts & IRM > IRM > Settings.
- Select the Incidents tab and find the Prefixes section.
- Click + Add Prefix to create a new prefix.
- Enter a Name and Description for the prefix.
- Edit or delete existing prefixes as needed.
- When declaring a new incident, select the desired prefix from the dropdown menu.
For more information, refer to the Customize incident channel prefixes documentation.
Configure Incident announcements
Incident announcements help keep your team aware and informed during critical events. Configure these announcements to ensure that stakeholders are kept up-to-date in Slack during an incident.
To configure incident announcements:
- In Grafana Cloud, navigate to IRM > Integrations > Apps and select Slack IRM.
- Select the Slack channel where you want to send notifications. You can either choose from the dropdown menu or manually add your Channel ID. The Channel ID can be found in the About tab of the Slack channel.
- Define the incident-specific fields:
- Incident type: Choose whether the incident is internal or private.
- Include incidents: Specify which types of incidents to announce—options include all incidents, drills, or non-drills.
- Apply filters to your incident announcements to tailor the notifications to specific channels:
- Incident filter: For example, you might filter by label, such as
label: 'squad:datasources'
.
- Incident filter: For example, you might filter by label, such as
Manage Slack attachments
When you use the 🤖 emoji reaction on a Slack message containing a file, the file is securely copied to Grafana Cloud storage. This ensures your incident timeline remains intact, even if the file is later deleted from Slack.
- File retention: Control attachment retention in your incident timeline. Removing the 🤖 reaction deletes the attached files from Grafana Cloud storage.
- Incident web app: Deleting an item from the timeline within the IRM web app also removes the associated file from Grafana Cloud storage.
- File size limit: Files in Grafana IRM are limited to 100MB. Files too large to persist are still accessible via a link to the source file in Slack.
Available Slack commands
Note
The
/escalate
and/incident
Slack commands have been deprecated. Use/grafana
to learn more.
The /grafana
Slack commands allow users and teams to respond to alert groups and collaborate on incidents directly from Slack.
Tip
Use the 🤖 robot emoji Slack reaction to add important messages to the incident timeline.
Incident-related commands
Permissions scope and purpose
The Grafana IRM Slack app only requests permissions that are essential to its proper function and integration with Slack. Refer to the Slack documentation for more information on permission scopes.
By granting access to the app, you are authorizing Grafana IRM the following permissions in your Slack workspace: