About webhook integrations

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.

Note
Webhook integrations support events from all Hybrid Cloud Console services.

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.

If you have any issues with integrating the Hybrid Cloud Console with webhooks, contact Red Hat for support. To open a Red Hat support case directly from the Hybrid Cloud Console:

  1. Click Help (the ? icon) to open the help panel.
  2. Select the My support cases tab.
  3. Click Open a support case and add information about the issue.

Configure a webhook integration

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.

Before you begin

  • You have configured a webhook in your third-party application.
  • You have Organization Administrator or Notifications administrator permissions for the Hybrid Cloud Console.

Procedure

  1. In the Hybrid Cloud Console, navigate to Settings > Integrations.
  2. Click the Webhooks tab.
  3. Click Add integration.
  4. In the Integration name field, enter a name for your integration.
  5. Paste the webhook URL from your third-party application into the Endpoint URL field.
  6. 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.

  7. Click Next.
  8. 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.
    1. Select a product family, for example OpenShift, Red Hat Enterprise Linux, or Console.
    2. Select the event types you would like your integration to react to.
  9. To enable the integration, review the integration details and click Submit.
  10. 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.

What to do next

Verify your configuration:

Create a test notification to confirm you have correctly connected your application to the Hybrid Cloud Console:

  1. Next to your integration on the Integrations > Webhooks page, click the options icon (⋮) and then click Test.
  2. 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.
  3. Open your third-party application and check for the message sent from the Hybrid Cloud Console.
  4. In the Hybrid Cloud Console, go to Notifications > Event Log and check that the Integration: Webhook event is listed with a green label.

Create 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.

Before you begin

  • 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.
  • A webhook integration is configured. For configuration steps, see Configure a webhook integration.

Procedure

  1. In the Hybrid Cloud Console, navigate to Settings > Notifications.
  2. Under Notifications, select Configure Events.
  3. Select the application bundle tab you want to configure event notification behavior for: Red Hat Enterprise Linux, Console, or OpenShift.
  4. Click the Behavior Groups tab.
  5. Click Create new group to open the Create behavior group wizard.
  6. Type a name for the behavior group and click Next.
  7. In the Actions and Recipients step, select Integration: Webhook from the Actions drop-down list.
  8. From the Recipient drop-down list, select the name of the webhook integration you created and click Next.
  9. 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 Next.
  10. Review your behavior group settings and click Finish. The new behavior group appears on the Notifications > Configure Events page in the Behavior Groups tab.

What to do next

Verify your integration:

  1. 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.
  2. Wait a few minutes, and then navigate to your third-party application to check for a notification.
  3. 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 Troubleshoot notification failures in the notifications documentation for more details.