Set up a Slack integration
You can configure the Hybrid Cloud Console to send event notifications to a Slack channel or directly to a user. The Slack integration supports events from all Hybrid Cloud Console services.
The Slack integration in this example is configured for Red Hat Enterprise Linux. The integration also works with Red Hat OpenShift and Hybrid Cloud Console events.
The Slack integration uses incoming webhooks to receive event data.
If you have any issues with the Hybrid Cloud Console integration with Slack, contact Red Hat for support. Slack will not provide troubleshooting. The Hybrid Cloud Console integration with Slack is fully supported by Red Hat.
To open a Red Hat support case directly from the Hybrid Cloud Console:
- Click Help (the ? icon) to open the help panel.
- Select the My support cases tab.
- Click Open a support case and add information about the issue.
Configure incoming webhooks in Slack Copy linkLink copied!
To prepare Slack for integration with the Hybrid Cloud Console, you must configure incoming webhooks in Slack.
Before you begin Copy linkLink copied!
- You have owner or admin permissions to the Slack instance where you want to add incoming webhooks.
- You have App Manager permissions to add Slack apps to a channel.
- You have a Slack channel or user to receive notifications.
Procedure Copy linkLink copied!
-
Create a Slack app:
-
Enable incoming webhooks:
- Under the Features heading in the navigation panel, click Incoming Webhooks.
- Toggle the Activate Incoming Webhooks switch to On.
- Click the Request to Add New Webhook button. If required, enter a message to your administrators to grant access to your app and click Submit Request. A success message confirms you have configured this correctly.
-
Create an incoming webhook:
- Under Settings in the navigation panel, click Install App.
- In the Install App section, click the Install to workspace button.
- Select the channel where you want your Slack app to post notifications, or select a user to send notifications to as direct messages.
- Click Allow to save changes.
-
Optional: Configure how your Hybrid Cloud Console notifications appear in Slack:
- Under Settings in the navigation panel, click Basic Information.
- Scroll down to Display Information.
- Edit your app name, description, icon, and background color as desired.
- Click Save Changes.
-
Copy the webhook URL:
- Under Features, click Incoming Webhooks.
- Click the Copy button next to the webhook URL. You will use the URL to set up the integration in the Hybrid Cloud Console in Configure the Slack integration.
What to do next Copy linkLink copied!
Verify your integration:
- Open the Slack channel or user you selected during configuration, and check for a message confirming you have added the integration.
Configure the Slack integration Copy linkLink copied!
After you have configured an incoming webhook in Slack, you can configure the Hybrid Cloud Console to send event notifications to the Slack channel or user you configured.
Before you begin Copy linkLink copied!
- You are logged in to the Hybrid Cloud Console as an Organization Administrator or as a user with Notifications administrator permissions. For more information about setting up Notifications administrator permissions, see Control team access to notification settings in the notifications documentation.
Procedure Copy linkLink copied!
What to do next Copy linkLink copied!
Verify your configuration:
Create a test notification to confirm you have successfully connected Slack to the Hybrid Cloud Console:
- Next to your Slack integration on the Integrations > Communications page, click the options icon (⋮) and click Test.
- In the Integration Test screen, enter a message and click Send. If you leave the field empty, the Hybrid Cloud Console sends a default message.
- Open the Slack channel you configured and check for the message sent from the Hybrid Cloud Console.
- In the Hybrid Cloud Console, go to Notifications > Event Log and check that the Integration: Slack event is listed with a green label.
Create the behavior group for the Slack integration Copy linkLink copied!
A behavior group defines which notifications will be sent to external services such as Slack when a specific event is received by the notifications service. You can link events from any Red Hat Hybrid Cloud Console service to your behavior group.
Before you begin Copy linkLink copied!
- You are logged in to the Hybrid Cloud Console as an Organization Administrator or as a user with Notifications administrator permissions.
Note You cannot log in to the Hybrid Cloud Console with your email address unless your email address is the same as your Red Hat login. For more information, see ../get-started/access-hcc.dita#finding-login. - You have configured the Slack integration.
Procedure Copy linkLink copied!
What to do next Copy linkLink copied!
Verify your integration:
- Create an event that will trigger a Hybrid Cloud Console notification. For example, run
insights-clienton a system that will trigger a policy event. - Wait a few minutes, and then navigate to Slack.
- In your Slack channel, check for notifications from the Hybrid Cloud Console.
- In the Hybrid Cloud Console, go to Settings > Notifications > Event Log and check for an event that shows the label Integration: Slack.
- If the label is green, the notification succeeded.
- If the label is red, the integration might need to be adjusted.
- If the integration is not working as expected, verify that the incoming webhook connector was properly created in Slack, and that the correct incoming webhook URL is added in the Hybrid Cloud Console integration configuration.
Note See ../troubleshoot/troubleshoot-notif-failures.dita#proc-troubleshoot in the notifications documentation for more details.