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.
Specify alert severity, if the alert rule is enabled (or disabled) and if the payload should be included in the alert message.
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.
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:
For more info on the parameters please have a look at: Configuring the JavaMail Client Service
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.
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).
As a last step you need to define how often should your job be running – in my case it’s every 5 mins.
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.
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
Presentation for Component-Based Message Alerting with Solution Manager:
Does this also work with Single Stack JAVA only PI Installations (7.50)
It should work i think, as I implemented the same blog for single stack SAP PO 7.4 and it worked fine for me.
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
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
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.