Slack App Integration

Slack is a very popular team communication platform. OpsGenie is an alert and notification management solution that is highly complementary to Slack.

What does OpsGenie have to offer for Slack users?

OpsGenie has a native two-way integration with Slack. It's easy to configure and powerful: notifications of OpsGenie's robust alerts go right into your Slack channel. In turn, users can acknowledge, close or assign these alerts from the channel, as easily as entering a command like /genie ack 12.

Add a Slack integration in OpsGenie, and in seconds you will have combined Slack's easy-to-use team collaboration platform with OpsGenie's rich alert notification system and on-call rotation. You can execute actions on the alert just by typing a /genie command, into the chat.

Actually, there's more to what you can do on OpsGenie just by entering simple commands to Slack channel. Using /genie command, you can also mute OpsGenie notifications, get alert details, view schedule on-call, etc.

Now with the new Slack buttons, OpsGenie users can acknowledge, un-acknowledge or close alerts with just a button click.

"Require Matching a User" option is used to force matching Slack accounts with OpsGenie accounts. Chat user mapping section addresses this issue.

Install Slack App

  1. Go to Slack App's integration page -> Slack Integration
  2. Click "Add to Slack" button
  1. Select "Slack Team" and "Channel".
  2. Click "Authorize" button to give access to OpsGenie Slack App.
  1. Integration will be automatically created. (If you are not logged into OpsGenie, you will need to log in.)
  2. Note that you need to have required permission to add integration in OpsGenie.
  1. You can modify the alert message that will be sent to your Slack channel. In the Slack Integration's page, we give users a choice to send description, tags and routed teams information to message.

Slack Buttons

  1. Using Slack buttons is optional. You can disable it on integration's edit page by using "Use Slack Buttons" option.
  2. Message with Slack buttons look like;
  1. You can acknowledge, un-acknowledge or close alerts.
  2. You can close mass notifications.
  3. When you click an already acknowledged, un-acknowledged or closed alert, you will get the relevant response and buttons will be changed accordingly.

Slack Message Menu

1.Message menus are built on Slack's interactive message framework just like Slack Buttons. Your "Using Slack Buttons" preference also applies to message menu.

2.You can execute assign, take ownership, snooze and add note actions on alerts. According to your selection, the message will be updated to proceed further. For example after you selected the "Add Note" option, a dialog box will be popped out to ask your note as shown below.

3.Message menu will be updated accordingly to your actions. Also the result of the action will be posted to the channel.

"Execute Commands" Option

  1. "Execute Commands" option is used to determine the integration which executes the genie command.
  2. The reason to do so is that Slack registers slash commands for the whole team, but more than one OpsGenie integration can be installed in Slack.
  3. Only one Slack integration can have "Execute Commands" checked for a Slack team.
  4. "Require Matching a User" option is determined by the same integration that has "Execute Commands" option selected as slash command will be associated with this integration.

Chat User Mapping

  1. "Require Matching a User" is used to force matching Slack accounts with OpsGenie accounts.
  2. You can associate your Slack account to your OpsGenie account by using the /genie connect command.
  3. For more information you can refer to Chat User Mapping page
  4. Chat user mapping flow:

Using /genie Command

You can easily execute actions on OpsGenie alerts, just by entering a command with the tinyId of the alert into your Slack room. Note that you can execute a single command on multiple alerts.

You can create an alert, too. Use the alert command to create an alert in OpsGenie, right from your Slack channel.

Acknowledge Alert :
/genie ack [tinyID tinyID2..]

/genie ack 1
/genie ack 1 2 3

Close Alert :
/genie close [tinyID tinyID2..]

/genie close 1
/genie close 1 2 3

Add Note to Alert :
/genie note [note] to [tinyID tinyID2..]

/genie note this is note to 1
/genie note this is note to 1 2 3

Add Tag to Alert :
/genie addtag [tag1,tag2,..] to [tinyID tinyID2..]

/genie addtag high priority,important to 1
genie addtag high priority,important to 1 2 3

Acknowledge All Open Alerts :
/genie ackall

Close All Open Alerts :
/genie closeall

Assign Alert :
/genie assign [tinyID tinyID2..] to [user]

/genie assign 1 to
/genie assign 1 2 3 to

Take Ownership of Alert :
/genie own [tinyID tinyID2..]

/genie own 1
/genie own 1 2 3

Execute Action :
/genie exec [action] on [tinyID tinyID2..]

/genie exec customAction on 1
/genie exec customAction on 1 2 3

Create Alert :
/genie alert [alert message] for [team1,team2,user1..]

/genie alert this is alert message for
/genie alert this is alert message for integration team, product team
/genie alert this is alert message for myTeam,

Get Alert :
/genie get [tinyID]

/genie get 1

List Alerts :
Lists all open alerts.
/genie list

Lists all open alerts of specified team.
/genie list alerts of team1

List Integrations :
/genie list integrations

List Policies :
/genie list policies

List Teams :
/genie list teams
/genie list teams contains [search query]
/genie list teams starts with [search query]

Enable Integration/Policy :
/genie enable [name]

/genie enable policy

Disable Integration/Policy :
/genie disable [name]

/genie disable policy

Take On-call :
Takes on-call for the specified amount of time for the team or schedule. Default amount of time is 1h. If no schedule/team is specified, the user will take on-call for his team's schedule, or a single schedule he's participant in.
/genie oncall [me/user] [h/m/d] for [team/schedule/all]

Sample uses are:
/genie oncall me 2h for weekend_schedule
/genie oncall 1d for ops_team
/genie oncall me 2h for all
/genie oncall me 45m
/genie oncall me

Who is oncall :
Retrieves oncall user information from all schedules
/genie whoisoncall

Mute :
Mutes notifications for the user. Mutes for 5 minutes if not given.
/genie mute [me/username] [minutes(optional)]

/genie mute
/genie mute 15

Unmute :
Clears mute setting.
/genie unmute [me/username]

/genie unmute

Connect :
Connect your OpsGenie account to your chat account. If a connection exists, the currently connected OpsGenie user will be shown and you can choose to disconnect

For more details see the Chat User Mapping documentation page
/genie connect

Help :
/genie help

Slack App Integration