Skip to Content

Michal’s PI tips: Component-Based Message Alerting

Component-Based Message Alerting (CBMA) is the new way of sending alerts on SAP PI (either single or double stack) without the use of any additional components. CBMA is made of three componets:

a) Central configuration for creating alerts – alerts can be created in Integration Directory or in Netweaver Administrator

b) Alert Engine – which is supposed to evaluate rules and create alerts

c) Alert receivers (consumers) – components which can receive alerts from the Alert Engine

This first article about Component-Based Message Alerting will show how to create a typical alert configuration with an e-mail consumer which means that once the alert will get generated an e-mail with alert data will be distributed to the alert receivers.

Step 1 – Create alerts in Integration Directory

At first you need to specify a new alert rule and assign PI objects to that rule as shown in Figure below.

/wp-content/uploads/2012/03/content_0_85064.png

Specify alert severity, if the alert rule is enabled (or disabled) and if the payload should be included in the alert message.

Step 2

Specify which types of alerts should be included in the alert rule like for example all alerts from a single adapter type (file or jdbc), etc. You also need to specify an alert receiver (consumer) which in our case will be an e-mail service. Alert consumer does not need to be an e-mail service it can also be Solution manager or any other third party consumer (custom created), please refere to further reading section for other types of alert consumers. Once the alert is generated an e-mail will be distributed to the alert receiver.

/wp-content/uploads/2012/03/content_1_85065.png

Step 3

Configure alert consumer for e-mail notifications. There is a new JavaMail Client Service which needs to be configured on the in order to be able to consume alert messages on the JAVA stack. In order to make it work you need to set a few parameters there like smtp server, user, password and host for the e-mail server which will be distributing alert e-mails.

You can configure it with the use of Netweaver admin: Configuration -> Infrastructure -> Java System Properties -> Services – Java Mail Client

In the properties tab configure at least parameters like:

– mail.from

– mail.smtp.host

– mail.smtp.password

– mail.smtp.user

/wp-content/uploads/2012/03/component_based_alerts_5_85017.png

For more info on the parameters please have a look at: Configuring the JavaMail Client Service

Step 4

The last thing you need to do is to schedule a job that will be running and creating alert notifications from the generated alerts.

Open SAP Netweaver admin: Operations -> Jobs -> Java Scheduler -> Job Definitions

Next you need to add a new task for AlertConsumerJob job as shown in the Figure below.

/wp-content/uploads/2012/03/component_based_alerts_2_85036.png

Then you can fill out the necessary details in the task parameters (like from and to e-mail and consumer specified in the Integration Directory).

/wp-content/uploads/2012/03/component_based_alerts_3_85039.png

As a last step you need to define how often should your job be running – in my case it’s every 5 mins.

/wp-content/uploads/2012/03/component_based_alerts_4_85040.png

And you’re done with the configuration – now you just need to wait for alert to be generated on your PI system. 

Alert check at consumer’s inbox

Once the alert will be raised your configured alert receiver should receive an e-mail with the alert data similar to the one below.

/wp-content/uploads/2012/03/component_based_alerts_1_85042.png

Next episodes:

In the next episodes of about this topic I will try to concentrate more on other Component-Based Message Alerting topics like:

– error handling with alert configuration

– other consumer types

Further Reading:

Presentation for Component-Based Message Alerting with Solution Manager:

http://wiki.sdn.sap.com/wiki/display/TechOps/Using+component-based+message+alerting

90 Comments
You must be Logged on to comment or reply to a post.
  • Hi Michal,

    Great blog !!!!

    Can i use CBMA for triggering success mail as well?

    I have a requirement in which i need to send success and failure messages from SAP PO 7.5 for data getting inserted/updated at the receiver database.

    following is the flow:

    SAP ECC(ABAP Proxy)–> SAP PO–> dB

     

    Regards,

    Akash Chauhan

  • Hi all

    Are there any documents where the specific configuration item “message-status” are defined.

    We try to set a filter that we receive only mails from our PO system if there are problems with asynchrnous messages. Actually we receive all of them

    Thanks for help

    /
  • Hi  Michal,

    Is it possible to add source payload as an attachment using CBMA. Kindly provide your suggestion on this. If it’s not possible, please give me the possible way to achive this.

    Man thanks

    KS