Thursday, February 20, 2020

Pipeline Alerts in OSB

Alerts in OSB are used to notify members of the team about any issues/abnormalities/factors in the services that need to be notified for immediate or future action.

Two types of alerts can be configured in OSB - Pipeline alerts and Service Level Agreement (SLA) alerts.

This blog will provide basic examples of how to set Pipeline alerts.


Pipeline Alerts:

These are simple alerts setup in the OSB pipeline based on the message context/body/payload. We can consider these alerts to be more for business purpose or error handling. To notify business users about any discrepancies in the data being submitted or any other errors to be reported.

Say, for example, 
a) In an Order processing flow in OSB, if there are any orders being processed with Price more than $1000, an alert notification needs to be raised.
b) If there are specific business errors in the flow, an alert notification need to be raised.

Here, I have created a simple OSB to show on how to work with Pipeline alerts. This blog will not cover the basic OSB creation process.

This OSB will take two int elements and an Operation parameter as input. If the operation is Sum, addition is done on the input parameters and response is returned. If the operation is Sub, subtraction is done. If the operation in anything else, an Alert needs to be raised.

Here's the screenshot of how pipeline looks. SumNode and SubNode are the two valid nodes which would return results. Default node will raise an alert with invalid operation error. The highlighted part is the alert that has been added. I will show in detail on how to go with the creation of pipeline alert.



Right click on the project and Create an alert destination. Give a specific name.


In the next screen, ensure that Alert logging is enabled. This will help to view the alerts in the alerts dashboard.


In the Pipeline, in default operation node, drag and drop an alert activity. You would see the following alert properties.


Lets start filling up each of the above properties.

Content will be the actual data you would want to capture in the alert. In my case, I would want to show the operation that caused the issue.
 

Summary can be some descriptive heading for the alert.

Severity - There are several levels present in the drop down. Select the one which you would want the alert to be notified as.


Finally, for the destination, choose the alert destination you created in the initial steps.


We are done with the alert setting. Now test the OSB with an operation other than Sum and Sub, you would find the alert in the console.

Navigation to check the alert - Go to EM console -> Select the service-bus under SOA -> Click on Alerts History tab.

In the Alert Type -> Choose Pipeline Alerts. You can also filter by Alert Summary name. Click on Search. You can find the alerts as following.


Click on the Alert Summary for any one of the notifications, you can find all the details that have been logged.



No comments:

Post a Comment