Suchen

Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 7. Configuring a webhook integration with the Hybrid Cloud Console

download PDF

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.

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

  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. Review the integration details and click Submit to enable the integration.
  9. 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:

  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.

Additional resources

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

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.

Verification

  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 Troubleshooting notification failures with the event log and integration settings in the notifications documentation for more details.

7.3. Additional resources

Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.