Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Slack integration for Grafana OnCall
The Slack integration for Grafana OnCall incorporates your Slack workspace directly into your incident response workflow to help your team focus on alert resolution with less friction.
Integrating your Slack workspace with Grafana OnCall allows users and teams to be notified of alerts directly in Slack with automated alert escalation steps and user notification preferences. There are a number of alert actions that users can take directly from Slack, including acknowledge, resolve, add resolution notes, and more.
Before you begin
To install the Slack integration, you must have Admin permissions in your Grafana instance as well as the Slack workspace that you’d like to integrate with.
For Open Source Grafana OnCall Slack installation guidance, refer to Open Source Grafana OnCall.
Install Slack integration for Grafana OnCall
- Navigate to Settings tab in Grafana OnCall.
- From the Chat Ops tab, select Slack in the side menu.
- Click Install Slack integration.
- Read the notice and agree to proceed to the Slack website.
- Provide your Slack workspace URL and sign with your Slack credentials.
- Click Allow to give Grafana OnCall permission to access your Slack workspace.
Post-install configuration for Slack integration
Configure the following additional settings to ensure Grafana OnCall alerts are routed to the intended Slack channels and users:
- From your Slack integration settings, select a default slack channel in the first dropdown menu. This is where alerts will be sent unless otherwise specified in escalation chains.
- In Additional Settings, configure alert reminders for alerts to retrigger after being acknowledged for some amount of time.
- Ensure all users verify their slack account in their Grafana OnCall users info.
Connect Slack user to Grafana OnCall
- From the Users tab in Grafana OnCall, click View my profile.
- In the User Info tab, navigate to Slack username, click Connect.
- Follow the instructions to verify your account.
Configure Escalation Chains with Slack notifications
Once your Slack integration is configured you can configure Escalation Chains to notify via Slack messages for alerts in Grafana OnCall.
There are two Slack notification options that you can configure into escalation chains, notify whole Slack channel and notify Slack user group:
- In Grafana OnCall, navigate to the Escalation Chains tab then select an existing escalation chain or click + New escalation chain.
- Click the dropdown for Add escalation step.
- Configure your escalation chain with automated Slack notifications.
Configure user notifications with Slack mentions
To be notified of alerts in Grafana OnCall via Slack mentions:
- Navigate to the Users tab in Grafana OnCall, click Edit next to a user.
- In the User Info tab, edit or configure notification steps by clicking + Add Notification step
- select Notify by in the first dropdown and select Slack mentions in the second dropdown to receive alert notifications via Slack mentions.
Configure on-call notifications in Slack
The Slack integration for Grafana Oncall supports automated Slack on-call notifications that notify individuals and teams of their on-call shifts. Admins can configure shift notification behavior in Notification preferences:
- When an on-call shift notification is sent to a person or channel, click the gear icon to access Notifications preferences.
- Configure on-call notifications for future shift notifications.
Slack commands and message shortcuts
The Grafana OnCall Slack app includes helpful message shortcuts and slash commands.
Slack commands
Use the /oncall
Slack command to create a new alert group directly from Slack targetting a team and/or route.
- Type
/oncall
in the message box of the desired Slack channel then click Send. - Fill out the Start New Escalation creation form then click Submit.
- Once the Grafana OnCall app sends a Slack message with the newly created alert, the alert group is open and firing.
Use the /escalate
Slack command to create a new alert group directly from Slack and specifically paging a user or
a schedule.
- Type
/escalate
in the message box of any Slack channel then click Send. - Fill out the Create alert group form then click Submit.
- Once the Grafana OnCall app sends a Slack message with the newly created alert, the alert group is open and firing.
Message shortcuts
Use message shortcuts to add resolution notes directly from Slack. Message shortcuts are available in the More actions menu from any message.
Note: In order to associate the resolution note to an alert group, this message shortcut can only be applied to messages in the thread of an alert group.
- From an alert group thread, navigate to the Slack message that you wish to add as a resolution note.
- Hover over the message and select More actions from the menu options.
- Select Add as resolution note.
- The Grafana OnCall app will react to the message in Slack with the memo emoji and add the message to the alert group timeline.