Chapter 3. Configuring a webhook integration with the Hybrid Cloud Console For third-party applications that do not have a native Hybrid Cloud Console integration available, you can use the webhook integration type to receive event notifications from the Hybrid Cloud Console in your chosen application. Webhook integrations support events from all Hybrid Cloud Console services. Third-party applications can be configured to allow inbound data requests by exposing webhooks and using them to listen for incoming events. The Hybrid Cloud Console integrations service uses this functionality to send events and associated data from each service. You can configure the Hybrid Cloud Console notifications service to send POST messages to those third-party application webhook endpoints. For example, you can configure the Hybrid Cloud Console to automatically forward events triggered when a new Advisor recommendation is found. The event and its data are sent as an HTTP POST message to the third-party application on its incoming webhook endpoint. After you configure the endpoints in the notifications service, you can subscribe to a stream of Hybrid Cloud Console events and automatically forward that stream to the webhooks of your choice. Each event contains additional metadata, which you can use to process the event, for example, to perform specific actions or trigger responses, as part of your operational workflow. You configure the implementation and data handling within your application. Contacting support If you have any issues with integrating the Hybrid Cloud Console with webhooks, contact Red Hat for support. You can open a Red Hat support case directly from the Hybrid Cloud Console by clicking Help ( ? icon) > Open a support case , or view more options from ? > Support options . 3.1. Configuring a webhook integration with the Hybrid Cloud Console For third-party applications that do not have a native Hybrid Cloud Console integration available, configure a webhook integration to receive event notifications from the Hybrid Cloud Console in your chosen application. Prerequisites You have configured a webhook in your third-party application. You have Organization Administrator or Notifications administrator permissions for the Hybrid Cloud Console. Procedure In the Hybrid Cloud Console, navigate to Settings > Integrations . Click the Webhooks tab. Click Add integration . In the Integration name field, enter a name for your integration. Paste the webhook URL from your third-party application into the Endpoint URL field. Optional: Enter a Secret token if one is configured. Note A secret token is essential for protecting the data sent to the integration endpoint and should always be used when integrating the Hybrid Cloud Console with third-party applications. Click . Optional: Associate events with the integration. Doing this automatically creates a behavior group. Note You can skip this step and associate the event types later. Select a product family, for example OpenShift , Red Hat Enterprise Linux , or Console . Select the event types you would like your integration to react to. To enable the integration, review the integration details and click Submit . Refresh the Integrations page to show the webhook integration in the Integrations > Webhooks list. Under Last connection attempt , the status is Ready to show the connection can accept notifications from the Hybrid Cloud Console. Verification Create a test notification to confirm you have correctly connected your application to the Hybrid Cloud Console: to your integration on the Integrations > Webhooks page, click the options icon (...) and then 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 your third-party application 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: Webhook event is listed with a green label. Additional resources For more information about setting up Notifications administrator permissions, see Configure User Access to manage notifications in the notifications documentation. 3.2. Creating the behavior group for a webhook integration A behavior group defines which notifications will be sent to external services 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. For more information about behavior groups, see Configuring Hybrid Cloud Console notification behavior groups . Prerequisites You are logged in to the Hybrid Cloud Console as an Organization Administrator or as a user with Notifications administrator permissions. A webhook integration is configured. For configuration steps, see Section 3.1, "Configuring a webhook integration with the Hybrid Cloud Console" . Procedure In the Hybrid Cloud Console, navigate to Settings > Notifications . Under Notifications , select Configure Events . Select the application bundle tab you want to configure event notification behavior for: Red Hat Enterprise Linux , Console , or OpenShift . Click the Behavior Groups tab. Click Create new group to open the Create behavior group wizard. Type a name for the behavior group and click . In the Actions and Recipients step, select Integration: Webhook from the Actions drop-down list. From the Recipient drop-down list, select the name of the webhook integration you created and click . In the Associate event types step, select one or more events for which you want to send notifications (for example, Policies: Policy triggered ) and click . Review your behavior group settings and click Finish . The new behavior group appears on the Notifications > Configure Events page in the Behavior Groups tab. Verification Create an event that will trigger a Hybrid Cloud Console notification. For example, run insights-client on a system that will trigger a policy event. Wait a few minutes, and then navigate to your third-party application to check for a notification. In the Hybrid Cloud Console, go to Settings > Notifications > Event Log and check for an event that shows the label Integration: Webhook . If the label is green, the notification succeeded. If the label is red, verify that the incoming webhook connector was properly created in your application, and that the correct incoming webhook URL is added in the Hybrid Cloud Console integration configuration. Note See Troubleshooting notification failures in the notifications documentation for more details. 3.3. Additional resources For more information about Hybrid Cloud Console notifications methods, see Configuring notifications on the Red Hat Hybrid Cloud Console . For information about troubleshooting your integration, see Troubleshooting Hybrid Cloud Console integrations . For webhook configuration examples, see these articles in the Red Hat blog: Exploring Red Hat Insights integration with Jira Software Configuring Hybrid Cloud Console to forward notifications events to a Jira webhook trigger Integrate Red Hat Insights into your existing operational workflow

Commands: