Skip Headers
Oracle® Retail Service Backbone Developers Guide
14.0
E49441-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

4 Introduction to Alerts

Alerts are generated by OSB monitoring framework and they help to diagnose problems when they occur. Oracle Service Bus provides two types of alerts:

Pipeline/Business Alerts

Pipeline alerts can be raised in the message flow of the proxy service. You can use the alerts in a message flow for:

SLA Alerts

SLA alerts are raised in Oracle Service Bus to indicate potential violation of the Service Level Agreements (SLAs). You can use SLA alerts for:

Consider the following use case to verify the service level agreements:

Assume that a particular proxy service is generating SLA alerts due to slow response time. To investigate this problem, you must log in to the Oracle Service Bus Administration Console and review the detailed statistics for the proxy service. At this level, you can identify that a third-party web service invocation stage in the pipeline is taking a lot of time and is the actual bottleneck.

You can use these alerts as the basis for negotiating SLAs. After successfully negotiating SLAs with the third-party web service provider, you should configure alert metrics to track the web service provider's compliance with the new agreement terms.

There are different ways to add SLA alerts and Business alerts in RSB decorator projects. SLA alerts can be added from OSB console after the decorator has been deployed in a OSB server. Pipeline alerts can be added from either OEPE or from OSB console. It is recommended to add pipeline alerts in the OEPE and then export the decorator jar.

Default Alerts in RSB Decorator Projects

RSB decorator jars have a default SLA alert configured for each proxy and business service. The default alert rule name is ErrorCountRule. This alert is configured to generate an SLA alert whenever an error condition occurs in the message flow. This is just a sample SLA alert. It is recommended to delete this rule and create a new rule for the actual SLA criteria for that environment.

How to add new SLA alert

SLA alerts are operational settings and they can be added or modified only from OSB console. Follow the steps to delete the default alert rule and add a new rule:

  1. Log in to OSB console and access the Projects page.

    Surrounding text describes image163.png.
  2. Click the project for which you want to modify SLA alert.

    The steps to add or modify an SLA alert are same for both business service and proxy service. In this example, we will show steps for a business service. Browse to the business service and go to SLA Alert Rules tab of that service.

    Surrounding text describes image165.png.
  3. Click Create in Change Center to create a new session.

    Surrounding text describes image167.png.
  4. Click Delete in the alert rule row.

    Surrounding text describes image169.png.
  5. The rule is deleted.

    Surrounding text describes image171.png.
  6. Click Add at the bottom to add a new rule.

    Surrounding text describes image173.png.
  7. Enter appropriate values for Rule Name and Alert Summary fields. It is recommended to have a good summary of why this alert rule should be generated. Having proper description of all fields will be useful when looking at rules in RIC console and it will help better in diagnosing the issues.

    Surrounding text describes image175.png.
  8. For Alert Destination, click the Browse button. It shows the list of all alert destinations in the OSB server. You can select the default alert destination or create a new destination and choose that.

    Surrounding text describes image177.png.
  9. Click Submit to select the alert destination.

    Surrounding text describes image179.png.
  10. Click Next. In the next page you can build the expression which defines the criteria for alert rule.

    Surrounding text describes image181.png.
  11. Now in the Simple Expression area, you can build the expression for which you want to generate SLA alert. In this example, we will build an expression to generate an SLA alert whenever the response time of business service is more than one second.

    Surrounding text describes image183.png.
  12. Click Add.

    Surrounding text describes image185.png.
  13. You can build more complex expression using And and Or buttons to build the rule. After the rule expression is built, click Last.

    Surrounding text describes image187.png.
  14. In the above page, you will see all the details about the new rule. Note that the Rule Description field is empty. We recommend that the condition expression is copied into the description field as well, so that when the SLA alert is displayed in the RIC, the exact condition of causing the alert is also displayed. The condition expression is not available in RIC, but the description field is available. Therefore we should have a good description for the alert. Follow the steps to copy the condition expression into the description field.Right-click the expression string and select copy.

    Surrounding text describes image189.png.
  15. Click Prev button twice.

    Surrounding text describes image191.png.
  16. Paste the condition expression into the Rule Description field.

    Surrounding text describes image193.png.
  17. Click Last>> to go to last page.

    Surrounding text describes image195.png.
  18. Click Save.

    Surrounding text describes image197.png.
  19. Click Activate and then Submit to commit the changes in server.

This completes the steps to create new SLA alert rule.


Note:

SLA alerts are operational settings and can be added and modified only from OSB console. If the decorator jar is re-deployed on the server, remember that all the operational settings and SLA alerts will be lost. After deploying the new decorators, the SLA alerts will need to be created again.

How to Add New Pipeline/Business Alert

Pipeline alerts are also called Business Alerts in RSB context. The reason for calling them business alerts is that they are used mostly to identify unusual business conditions or errors. For example, a customer may want to see an alert whenever a request is made with a very large amount.

Pipeline alerts can be added in proxy services only. In RSB decorators, the message flow is defined in local proxy services. Therefore any new pipeline alerts should be added in local proxy service.

In this example, we will take an oms-CustomerOrderService where a business alert needs to be raised when grand total > 500000. The following steps are for adding a new pipeline alert:

  1. Right-click Request Pipeline, select Insert Into >Stage to add a new stage as shown below:

    Surrounding text describes image199.png.
  2. Enter appropriate name for the stage.

    Surrounding text describes image201.png.
  3. In the stage, add a new If Then flow, right click the stage added above, select Insert Into> Flow Control > If Then as shown below:

    Surrounding text describes image203.png.
  4. The If Then flow is added as shown below:

    Surrounding text describes image205.png.
  5. For the first If condition, click the <Condition> link and access Condition Builder tab.

    Surrounding text describes image207.png.
  6. In this screen you can build the expression for the alert rule. Select the request schema element for the operation:

    Surrounding text describes image209.png.
  7. Drag the element to Operand window:

    Surrounding text describes image211.png.
  8. Select the Operator and enter a Value for comparison.

    Surrounding text describes image213.png.
  9. Click Add to add the condition to Condition Expression window.

    Surrounding text describes image215.png.
  10. You can build more complex expression using And and Or buttons. We will keep it simple here. After building the condition expression, click OK.

    Surrounding text describes image217.png.
  11. Now we need to add Alert action for this If condition as shown below:

    Surrounding text describes image219.png.
  12. The alert action gets added, right click the If condition added in the above steps, select Insert Into > Reporting > Alert as shown:

    Surrounding text describes image221.png.
  13. In the Expression field, you can enter the xml that you want to see in alert description when alert is generated. For example, you may want to see the whole SOAP body which caused the alert to be generated or a subset of the SOAP body. Click the <Expression> link to select the XML.

    Surrounding text describes image223.png.
  14. In this example, we will add CustOrderDesc element to the expression.

    Surrounding text describes image225.png.
  15. Drag CustOrderDesc to the Expression window.

    Surrounding text describes image227.png.
  16. Click OK. In the Summary field, enter an appropriate name for the alert.

    Surrounding text describes image229.png.
  17. Select Destination for the Alert. You should select the destination that was created by default in this project. Click Browse.

    Surrounding text describes image231.png.
  18. Click OK to close the dialog box.

    Surrounding text describes image233.png.

This finishes up the steps for adding new business alert to a message flow in a decorator.

How to add E-mail Notification for Alerts

The default alert destination created by RSB only sends alerts on OSB reporting provider JMS. The alert destination can also be configured to send email notifications; this will be useful to get immediate notifications for SLA alerts. For generating email notifications first step is to create SMTP server configuration in OSB server. You need to have a SMTP server running and URL, port number information available. Following are the steps to create SMTP server configuration using OSB console:

  1. Create a new session in OSB console.

  2. Go to System Administration > SMTP Servers page.

  3. Click Add.

  4. Provide a name for the server.

  5. Provide URL of the SMTP server. If the SMTP server is running on localhost, then the URL will be localhost.

  6. Enter SMTP port number, generally it is 25.

  7. If it is secured, then provide username/password. Generally it is not required when running on localhost.

  8. Click Save. Click Activate and Submit to commit changes to the server.

  9. This completes the steps for creating SMTP server configuration. Following is a screenshot of this:

    Surrounding text describes image235.png.

After creating SMTP server configuration, we need to update alert destination to use the SMTP server for sending notifications.

  1. Create a new session in OSB console.

  2. Go to Project Explorer tab and browse to the project for which you want to modify the alert destination. In this example, we will update cm-Customer-AppServiceDecorator project. When you click the project; it shows the list of files in that project. The default alert destination follows the naming convention as <appName>-<ServiceName>-AppServiceDecoratorAlert. So the file name here will be cm-Customer-AppServiceDecoratorAlert.

  3. Click the alert destination to go to alert destination configuration page.

    Surrounding text describes image237.png.
  4. Click Edit.

    Surrounding text describes image239.png.
  5. In the e-mail Recipients section, click Add button. In the next page, you need to provide details about senders and receivers of e-mail notifications as shown below:

    Surrounding text describes image241.png.
    • Mail Recipients: This needs the email addresses of the persons who should receive email notification.

    • SMTP Server: Select the name of the SMTP server that was created earlier.

    • From Name: The name of the person on whose behalf the notification is sent.

    • From Address: Email address of the person on whose behalf the notification is sent.

    • Reply To Name: Name of the person which should show in reply-to field of the email.

    • Reply To Address: Email address which should show in reply-to field of email.

  6. Click Save after entering all the values. Click Activate and Submit to commit changes to the server. This completes the steps required for setting up email notifications for alerts.