Creating a Slack integration
A Slack integration allows you and your team to use collaborative ChatOps features for receiving incident alerts and status. You can only connect to one ChatOps tool at a time, so if you already configured another ChatOps integration (such as Microsoft Teams), you won't be able to connect to Slack.
On the Manage integrations tab you can create, edit, and delete integrations.
Before you set up your Slack integration, you must create your bot and configure Slack to communicate with IBM Cloud Pak for AIOps. For more information about configuring a Slack application, see Configuring Slack applications for integration.
Note: If the URL of the on-premises IBM Cloud Pak for AIOps instance can't be accessed by Slack, you can use Secure Tunnel to expose the IBM Cloud Pak for AIOps instance to either a cluster (Red Hat OpenShift or IBM Kubernetes Service cluster) or a host machine (virtual machine or physical machine), which is accessible from the public network. Then, you can get a URL that can be accessed by Slack. For more information about Secure Tunnel, see Using Secure Tunnel for ChatOps.
For more information about working with a Slack integration, see the following sections:
For more information about HTTP headers for the various credential types, see HTTP headers for credential types.
Creating a Slack integration
To complete your Slack integration, you need the following information:
- Signing secret
- Bot User OAuth Access Token
- Proactive channel ID
- Reactive channel ID
- If you have an offline (air-gapped) deployment of IBM Cloud Pak for AIOps , then you must have the details of a proxy server that you have set up for IBM Cloud Pak for AIOps to connect to Slack.
Obtaining these values require you to have the following prerequisites:
-
Slack
-
API authentication to your Slack instance
-
If you have an online deployment of IBM Cloud Pak for AIOps, network connectivity between the IBM Cloud Pak for AIOps instance and the Slack Enterprise edition instance
Note: If a direct endpoint cannot be established, you can use Secure Tunnel to securely tunnel between the two. For more information about Secure Tunnel, see Using Secure Tunnel for ChatOps.
Important: You can only create one ChatOps integration (Microsoft Teams or Slack) per instance.
For more information about setting up and configuring Slack for integration, see Configuring Slack for integration.
To create a Slack integration, complete the following steps:
-
Log in to IBM Cloud Pak for AIOps console.
-
Expand the navigation menu (four horizontal bars), then click Define > Integrations.
-
On the Integrations page, click Add integration.
-
From the list of available integrations, find and click the Slack tile.
Note: If you do not immediately see the integration that you want to create, you can filter the tiles by type of integration. Click the type of integration that you want in the Category section.
-
On the side-panel, review the instructions and when ready to continue, click Get started.
-
On the Add integration page, define the general integration details:
- Name: The display name of your integration. If you have any restrictive EgressNetworkPolicies in place, ensure that they are updated to allow for this outbound integration.
- Description: An optional description for the integration.
- Signing secret: The secret that is generated for the client. You can copy this value from the App Credentials section inside the Basic Information page of the Slack application. For more information about obtaining this value, see Configuring your Slack app. If you edit this field, the secret for the current integration is updated. Leave this field blank if you do not want to update the secret.
- Bot token: Token for the bot that is associated with the app that is installed in a workspace. You can copy this value from the Install App section in the Slack application. For more information about obtaining this value, see Configuring your Slack app. If you edit this field, the secret for the current integration is updated. Leave this field blank if you do not want to update the secret.
- Language ID: A dropdown list offering various different languages options for the integration.
- Proactive channel: Enter a proactive channel for the integration. The channel ID for the channel that you want to use for notifications (from change risk, for example). For more information about obtaining channel ID values, see Obtaining links to your channels.
- Reactive channel: Enter a reactive channel for the integration. The channel ID for the channel that you want to use for incidents and alerts. For more information about obtaining channel ID values, see Obtaining links to your channels.
-
Click Next.
On the optional Configure Proxy page, toggle the Enable Proxy selection to on if you require a proxy server to connect to Slack, and enter the following information:
- Proxy URL: The hostname of your proxy server
- Proxy Port: The port number
- Proxy username: The proxy server username
- Proxy password: The proxy server password
Figure. Create Slack integration - configure proxy You can test your integration by clicking Test connection to Slack.com.
Figure. Test connection -
Click Done.
You create a Slack integration in your instance. Unlike log or event integration, you do not need to enable ChatOps integrations after creating them.
To create more integrations, see Configuring Integrations.
For more information about working with the insights provided by your integration, see ChatOps insight management.
Editing a Slack integration
After you create your integration, your can edit the integration. For example, if you want to change which channel your proactive messages are routed to, you can edit it. To edit a integration, complete the following steps:
-
Log in to IBM Cloud Pak for AIOps console.
-
Expand the navigation menu (four horizontal bars), then click Define > Integrations.
-
Click the Slack integration type on the Manage integrations tab of the Integrations page.
-
On the Slack integrations page, click the name of the integration that you want to edit. Alternatively, you can click the options menu (three vertical dots) for the integration and click Edit. The integration configuration opens.
Note: The integrations status in the Manage integrations tab might not display the status of your Slack integration. When you are editing a Slack integration, click the Test connection button to ensure that your credentials are correct.
You can also test your integration by going to the target channel in Slack and entering
/welcome
. IBM Cloud Pak for AIOps responds with a welcome message in Slack. -
Edit your integration. Click Next to go through the integration configurationn pages. Click Save when you are done editing.
Figure. Edit Slack integration
Your integration is now edited. For more information about deleting a integration, see Deleting a Slack integration.
Note: Updating a ChatOps integration with a new Slack app can result in disconnected ChatOps incidents. Existing incidents that were posted by a different app do not receive any more updates. You are recommended to use the same app resource when possible.
Deleting a Slack integration
If you no longer need your Slack integration, you can delete the integration from the console.
To delete a integration, complete the following steps:
-
Log in to IBM Cloud Pak for AIOps console.
-
Expand the navigation menu (four horizontal bars), then click Define > Integrations.
-
Click the Slack integration type on the Manage integrations tab of the Integrations page.
-
On the Slack integrations page, click the options menu (three vertical dots) for the integration that you want to delete and click Delete.
-
Enter the name of the integration to confirm that you want to delete your integration. Then, click Delete.
Your integration is deleted.