Subscribe to the feed

In a previous article, we demonstrated how you could expose a trigger endpoint in Jira on a publicly accessible URL. You used this URL in Hybrid Cloud Console (HCC) to configure a webhook integration to forward Red Hat Insights events with the Notifications service. We cover Red Hat Insights integrations and the use of webhooks in another blog post.

To trigger something in Jira, though, you have to communicate with it. Red Hat Insights can send notifications to an endpoint, with useful data that you've configured Jira to use.

Webhook integration

First, create a new webhook integration by logging in to the Hybrid Cloud Console and navigating to Settings > Integrations. You must be an Organization Administrator or have Notifications Administrator permissions to edit these settings.

The screen groups all configurations related to other Red Hat products and third party applications integrations. You can find webhook integrations in the Webhooks tab.

Webhooks configuration in Hybrid Cloud Console’s Settings

 

Webhooks configuration in Hybrid Cloud Console’s Settings

Click the Add integration button and follow the prompts. First, you must enter an integration name and an endpoint URL. In the endpoint URL field, enter the URL you created for the incoming webhook trigger. It follows this pattern (where <unique id> is specific to your trigger):

https://automation.atlassian.com/pro/hooks/ <unique id>

Add integration wizard for webhooks in Hybrid Cloud Console’s Settings

 

Add integration wizard for webhooks in Hybrid Cloud Console’s Settings

Leave the optional secret token field empty. It isn't used in this demonstration.

Click Next and Submit to create the integration endpoint for the Notifications service.

Set the destination for notifications

Now you must configure HCC so that every time Red Hat Insights events are triggered, each one is forwarded to the Jira Software integration you've created.

First, navigate to Settings > Notifications > Overview. The Overview screen describes the service and its functionality. It also guides you on getting started and configuring your organization for event notifications. All product documentation and guides are linked to this page.

Navigate to Notifications > Configure Events. Under the Red Hat Enterprise Linux tab, you can configure events and behavior groups. To forward Insights events, you first need to add your new integration to a behavior group in the Behavior Groups tab.

Depending on your own organization configuration, you may already have a behavior group you use for your notifications. You can either modify this behavior group, or create a new one specific to your Jira integration. For this example, edit your Default behavior group and add a new action by selecting Integration: Webhook as the action type, and JIRA (redhatinsights.atlassian.net) as recipient. The recipient name depends on the name you selected when configuring your new integration in Settings > Integrations.

Edit behavior group notifications configuration in Red Hat Insights

 

Edit behavior group notifications configuration in Red Hat Insights

Next, you must associate event types from application services to your behavior group. When one of these events triggers, all actions from the behavior group occur, including forwarding the event to your Jira webhook integration.

On the Configure Events page that follows, navigate to the Configuration tab, confirm that the behavior group is now associated with the events you selected. You can modify this association at any time from this screen, or edit your behavior group to modify its event association.

Configure Events and behavior groups association in Red Hat Insights

 

Configure Events and behavior groups association in Red Hat Insights

 

From now on, all events triggered from a Red Hat Insights service are forwarded to your Jira Software incoming webhook endpoint for processing. The expected result based on your rule is the creation of an incident ticket in Jira with relevant data parsed from your event’s JSON payload.

Validate the webhook trigger integration between Hybrid Cloud Console and Jira Software

There are multiple ways to trigger Insights events, and we aren't covering them in this article. However, you can validate that an event is triggered successfully from HCC by navigating to Settings and selecting Notifications > Event Log.

The Event Log provides an audit trail of all events triggered by HCC in the past 14 days. You can filter the list by event type, application or service, action type (such as a webhook) and action status (successful or failure), or according to a specific time range.

The information on the Action taken column allows you to validate the behavior group’s actions  when a particular event is triggered. In this example, you can click on Integration: Webhook for a given event to retrieve the name of the integration and its status.

You can see that the Insights event was successfully forwarded to the Jira endpoint:

Successful webhook integration status in Event Log

 

Successful webhook integration status in Event Log

Troubleshooting a failed notification

In the case of a failure status, first validate that the URL endpoint is correct.

If the Jira integration is missing from events triggered after configuration, validate that the integration is part of a behavior group’s actions, and that the behavior group is associated with the event types you are expecting to be forwarded.

Refer to Red Hat Insights product documentation for more troubleshooting tips.

Verify ticket creation in Jira

Now that you've validated that the events are forwarded successfully to the Jira incoming webhook endpoint, navigate to Jira and verify that new tickets have been generated as a result.

In Jira, click All tickets in the project you selected during the Create incident component of the Rule builder. Look at the results to confirm that new tickets were created in response to Red Hat Insight's notifications.

New tickets resulting from our integration in JIRA Software

 

New tickets resulting from our integration in JIRA Software

The summary text of the new tickets is generated according to the syntax provided in the Create incident configuration. As you'd expect in Jira, you can open a ticket to view its full description, which was generated according to the syntax provided to parse your JSON payload.

Integration

This example is simple, but it provides a basis for receiving and parsing a JSON payload from Hybrid Cloud Console for Red Hat Insights events. You can extend this example to leverage additional automation based on the event’s fields or even the natural language processing (NLP) feature provided by Jira to automatically associate events from the same host or the same issue on the same ticket.

We're always looking for additional use cases, and welcome feedback to help the product grow. Let us know what integrations you would like to see, or vendors or communities we should  collaborate with. Feel free to share your experience with us by using the Feedback form in Hybrid Cloud Console.


About the author

Jerome Marc is a Red Hat Sr. Principal Product Manager with over 15 years of international experience in the software industry spanning product management and product marketing, software lifecycle management, enterprise-level application design and delivery, and solution sales.

Read full bio
UI_Icon-Red_Hat-Close-A-Black-RGB

Browse by channel

automation icon

Automation

The latest on IT automation for tech, teams, and environments

AI icon

Artificial intelligence

Updates on the platforms that free customers to run AI workloads anywhere

open hybrid cloud icon

Open hybrid cloud

Explore how we build a more flexible future with hybrid cloud

security icon

Security

The latest on how we reduce risks across environments and technologies

edge icon

Edge computing

Updates on the platforms that simplify operations at the edge

Infrastructure icon

Infrastructure

The latest on the world’s leading enterprise Linux platform

application development icon

Applications

Inside our solutions to the toughest application challenges

Original series icon

Original shows

Entertaining stories from the makers and leaders in enterprise tech