Configure an Event-Driven Ansible integration
You can use Event-Driven Ansible to take advantage of Hybrid Cloud Console capabilities such as Red Hat Lightspeed to continuously analyze your inventory for potential issues and recommendations. Event-Driven Ansible connects sources of events with corresponding actions through rules.
The integration with the Hybrid Cloud Console notifications service uses Event-Driven Ansible to trigger actions. Each account configures how and who can receive these events, with the ability to perform actions depending on the event type.
If you have any issues with the Hybrid Cloud Console integration with Event-Driven Ansible, contact Red Hat for support. 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.
Add the Event-Driven Ansible integration and verify the connection Copy linkLink copied!
You can configure event-driven Ansible integrations.
Before you begin Copy linkLink copied!
- You are logged into the Red Hat Hybrid Cloud Console as an Organization Administrator or as a user with Notifications administrator permissions.
- The
redhat.insights_edacollection is installed and configured. - You have the webhook URL from Ansible.
Procedure Copy linkLink copied!
What to do next Copy linkLink copied!
Verify your integration:
Create a test notification to confirm you have successfully connected Event-Driven Ansible to the Hybrid Cloud Console:
- Next to your Event-Driven Ansible integration on the Integrations > Reporting & Automation 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 Event-Driven Ansible 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: Event-Driven Ansible event is listed with a green label.
Configure Event-Driven Ansible 2.5 for integration Copy linkLink copied!
You can configure Event-Driven Ansible 2.5 to receive event notifications from the Red Hat Hybrid Cloud Console or a third-party application.
Before you begin Copy linkLink copied!
- You have an environment with Ansible Automation Platform and Event-Driven Ansible 2.5 installed.
- You have Organization Administrator or Notifications administrator permissions for the Hybrid Cloud Console.
- You have a Github repository that contains at least one rulebook that uses the Red Hat Lightspeed EDA collection as a source. For examples, see Event-Driven Ansible for Red Hat Insights.
Procedure Copy linkLink copied!
What to do next Copy linkLink copied!
Verify your configuration:
Create a test notification to confirm you have correctly connected Event-Driven Ansible to the Hybrid Cloud Console:
- Next to your Event-Driven Ansible integration on the Integrations > Reporting & Automation 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.
- In Ansible Automation Platform with Event-Driven Ansible, navigate to Automation Decisions > Event Streams.
- On the Details tab of your event stream, confirm that the number under Events received has increased.
- In the Hybrid Cloud Console, go to Notifications > Event Log and check that the Integration: Event-Driven Ansible event is listed with a green label.
- For more Event-Driven Ansible configuration information and examples of Red Hat Lightspeed rulebooks, see the Documentation tab in the
insights_edacollection available from the Ansible Automation Hub Collections page.
Create the behavior group for the Event-Driven Ansible integration Copy linkLink copied!
A behavior group defines which notifications will be sent to external services such as Event-Driven Ansible 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. - The Event-Driven Ansible integration with the Hybrid Cloud Console is configured as described in Configure Event-Driven Ansible 2.5 for integration.
Procedure Copy linkLink copied!
- 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 Next.
- In the Actions and Recipients step, select Integration: Event-Driven Ansible from the Actions drop-down list.
- From the Recipient drop-down list, select the name of the integration you created (for example, My EDA Listener) and click Next.
- In the Associate event types step, select one or more events for which you want to send notifications (for example, Advisor: New recommendation) and click Next.
- Review your behavior group settings and click Finish. The new behavior group appears on the Notifications page.
What to do next Copy linkLink copied!
Verify your integration:
- Create an event that will trigger a Hybrid Cloud Console notification. For example, you can run the
insights clientcommand on a registered system to trigger a new recommendation event from Advisor. - To validate that the Hybrid Cloud Console integration was successful, in the Hybrid Cloud Console, go to Settings > Notifications > Event Log and check that the last event that you triggered shows the label Integrations: Event-Driven Ansible.
- If the label is green, the notification succeeded.
- If the label is red, verify that the stream has been properly created and exposed in Event-Driven Ansible, and that the correct stream URL is configured in the Hybrid Cloud Console integration configuration.