The article is a guide on Alert configuration in Process Integration (PI) single stack installation or Process Orchestration (PO) with a step-by-step configuration example. In this article we will discuss the features of the SAP PI/PO alert framework, then we will look into the architecture of Component-Based Message Alerting (CBMA), and finally the SAP PI/PO single stack alert configuration steps.
Before we jump to configuration steps and examples, first we will try to understand the architecture of the SAP message alerting framework.
SAP replaced the Netweaver Alert Framework which was included until Netweaver release 7.30 with a newer mechanism called Component-Based Message Alerting (CBMA).
To understand the CBMA, let’s first look at what the main features of an alert framework should be.
SAP PI/PO Alert Framework Features:
- It should have capabilities to create custom Alert Rules as per business needs.
- Ability to identify and collect errors, warnings and other alert messages which are generated in the system.
- Functionalities to distribute the identified alerts to selected parties.
SAP PI/PO Single Stack CBMA Alert Framework Components:
SAP Component Based Message Alerting (CBMA) framework consists of three main components to facilitate the three features above.
Central Configuration for Alerts:
Users or IT teams can configure Alert Rules and consumers as per their requirements either using Integration Directory (ID) or Netweaver Administrator.
Alert Engine:
Local Alert Engines are included in each runtime environment of Integration Engine (IE) and Advance Adapter Engine (AAE) of SAP PI/PO. Alert engine reads the alert event store (PI/PO message error information) and generates alerts if a matching Alert Rule is found for the generated error type. Then it updates the consumer Alert Store defined in the Alert Rule.
Alert Consumer:
Consumers receive alerts, generate notifications via SMS, e-mail, etc. Alert Consumer extracts the alerts from respective Alert Store and sends notifications. SAP Solution Manager is a special Alert Consumer with capabilities to process generated alerts and push them to alert inbox.
SAP PI/PO Alert Runtime Process Overview:
When an error occurs in a runtime of a PI message, it adds an error status to the message. When Alert Engine receives this error information or alert events from PI runtime, it checks for matching Alert Rules and configuration to decide if an alert should be generated or not. Alert generation depends on the error status and runtime component configuration of the Alert Rule.
Generated alerts contain information such as error event information, Alert Rule ID, timestamp, etc. Each alert consumer has separate Alert Stores. Alert Engine places created alerts in corresponding consumer Alert Stores. Finally, Alert Consumers retrieve the alerts from the local consumer Alert Store to be distributed to the end-users.
Alert Design Time Process Overview:
Alert Runtime Process Overview:
Step-by-Step Alert Configuration in SAP PI/PO Single Stack:
Let’s look at a simple e-mail notification configuration step by step. We will send an email notification to an end-user on errors that occur in an integration configuration.
Step 1: Create Alert Rules.
Alert Rules can be created either in Integration Directory (ID) or Netweaver Administrator. To create Alert Rules centrally using Netweaver administrator, go to Monitoring home > Configuration and Administration > Message Alert Rule Configuration. Otherwise, create them in ID as below.
Step 2: Configure Types of Objects to be Considered for Alert Rule.
You can specify interface-related objects such as Integrated Configuration Object (ICO), Configuration Scenario, Communication Component, etc. If you select either ICO or configuration scenario, alerts get generated for errors that occur in any stage of the message processing pipeline and for all interface components included in ICO.
Set Alert rule type and enable the Alert Rule.
Step 3: Configure Error Sources and Alert Consumer.
Select Error Sources for which the alerts should be generated. Check or uncheck the Error Sources in the extended tab of the Alert Rule configuration. You can configure alerts to be generated based on either errors which take place in different adapters or other runtime errors such as message mapping.
Include the consumer name where the generated alerts should be placed. This defines the local consumer Alert Store where the alerts generated under this Alert Rule would be placed. Since our aim is to send the alert as an email, let’s include the consumer as ALERT-TO-MAIL.
If you have a requirement to segregate the alerts and send them to multiple users, for example, separation of alerts on a SAP functional area basis, create different consumers which represent each functional area and assign them the correct interfaces in the Alert Rule.
Example:
- ALERT-TO-MAIL-OTC: Assign Interface Runtime Components of Order to Cash (OTC) functional area to this Alert Rule and Consumer.
- ALERT-TO-MAIL-P2P: Assign interface Runtime Components of Purchase to Pay (P2P) functional area to this Alert Rule and Consumer.
Step 4: Configure Java Mail Client.
This is a one-time activity and the BASIS team usually creates a default mail client in post-installation steps.
But if you need to create one you can do it by maintaining basic settings such as
- mail.from
- mail.smtp.host
- mail.smtp.password
- mail.smtp.user.
Step 5: Create the Task which Sends Emails Using the Java Mail Client Created in Step 4.
Go to NWA > Operations > Jobs > Java Scheduler > Task and add a new task.
Select consumer job “AddConsumerAlert” or “AlertConsumerJobV2” and set a suitable name for the task. AlertConsumerJobV2 is an updated version of the job and it has more parameters in comparison with the previous version. For example, you can configure an email template and set the location of the email template file as a parameter.
Job definition and parameters can be viewed from the Job Definition tab.
Follow the Java Scheduler Task creation configuration wizard.
Then configure the properties and details of the task. Configure consumer as “ALERT-TO-MAIL” and emailTo as the email address of the user who should receive the notification.
Set the start time and the frequency of the job. I have set the frequency as every 5 minutes.
Result:
I stopped the receiver file channel of the Integration Scenario to create couple of messages with errors.
Go to Java Scheduler > Jobs and find the Consumer Job you created. You can find the number of alerts consumed by the AlertConsumer task in the task log.
If you need any clarifications on the steps described here, please do not hesitate to leave a comment below.
HI,
How can i Transport the Alert consumer group
for ex:for speciific interface i have created ALERT-TO-TEST as a consumer..how do i transport this from DEV–QUALITY?
Hi, Transport the Alert Rules and create Alert Consumer in your target system.
Hi,
How can I attach IDOC xml file in this email that correspond to the error message?
Hi Thakur, You may have to create a separate interface using “AlertRetrieveAPI” and attach the payload in the message mapping.
Can you provide me step by step guide to do so if possible?
Hi,
I will try to write a post on that in the future.
Nice document, I configured in DEV and getting email but in Prod email not getting only alertconsumer jobs are creating
Hi ,
I have configured Alerts through Component Based Alert Monitoring(CBMA). But neither any logs can be seen nor any alert is getting triggered. Please help.
It means no need solman to monitor ?
We are getting multiple front end response time and schedule job alerts for sap pi in solman 7.2
Suggest me to provide the solution for fixing these issues.
Hi Shashidhar,
Solman is not mandatory to this scenario.
hello Shashidhar,
Your blogs are very informative. Thank you.
I have a doubt regarding CBMA mechanism which we do in SAP PO system.Can you please let me know what settings we need to do in task creation , so that i will receive only 1 alert for 1 failed message. Is there any settings that i should do while creating alert rule in NWA/ID.
Thanks,
Sirisha.
Amazing Blog 🙂 especially picture – Alert Runtime Process Overview.
Thank you Mohanraj!
Good explanation and excellent blog
Thank you very much, Suresh!
Hi Isuru,
Thanks for the detailed blog.
We are using SAP PI 7.11 and in our scenario we pull the data from SQL tables on sender side. The details related to SQL connection , SQL queries etc . are set in sender communication channel. Can we use SAP PI Alert mechanism in our scenario ? For instance if SQL server is not available or is down then PI will not be able to pull data. So is in this case we can use PI alert mechanism and if yes how it can be done?.
Thanks in Advance.
Regards,
Varun
Hi Varun,
Check if JDBC alerts or Run-time Error Sources suites your requirement. if not try using an adapter module to raise alerts.
Cheers
Isuru
Hi Isuru ,
How can I ensure that Alerts generated by known exceptions like socket & other time out errors for FTP(file.ftp.FTPEx: 421,425,550), SFTP,HTTP channels do not create incidents and thereby increase our workload in Prod.Since these errors are creating incidents in Consumer ,we dont want that these alerts trigger and Consumer reads these errors and create Incident no.The conditions are below:
If “ErrorText” value contains one of the following texts, please DO NOT create ticket:
• com.sap.aii.adapter.file.ftp.FTPEx: 421 Unexpected reply codeProxy is closed
• com.sap.aii.adapter.file.ftp.FTPEx: 425 Unexpected reply codeCant open data connection.
• com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeThe network path was not found.
• com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeThe process cannot access the file because it is being used by another process.
• com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeThe system cannot find the file specified.
• java.net.ConnectException: A remote host refused an attempted connect operation. (Connection refused)
• java.net.SocketTimeoutException: Accept timed out
• Exception received: com.jcraft.jsch.JSchException: Session.connect: java.net.SocketTimeoutException: Read timed out
• Exception received: com.jcraft.jsch.JSchException: timeout: socket is not established
Please suggest any feasible solution asap.
Regards,
Mayank
Hi Mayank,
Do u got any solution on this, even i am facing the same issue.
Thanks,
Venkatesh G
I am getting error from all message starting from source system. How can we restrict that . Can’t edit message header rule
Ditto on this problem. We’re trying to get alerts when a specific channel cannot connect (an SFTP Sender for example). But cannot add a channel directly to an alert only a business system/component. And if we add a channel to a config scenario, it adds the business system/component as well. This results in too many false positives – as any error with any channel in that system/component triggers the alert.
Hello Alex,
Using standard configuration of CBMA framework you cannot filter alerts by individual communication channels. We can only select error sources by category, adapter type and other runtime components. You maybe need to check other advanced options such as this.
Hope you will be able to solve your problem!
Cheers,
Isuru
Any other options to add payload to mail ?
I see that in the Task creation you indicated a GMAIL address. I just want to confirm if the Java mail client has been configured with GMAIL settings as well. This is the only thing I am not clear in this steps. Thank you.
Hi Joel,
I used the gmail email address as an example, of-cause you need to configure which domains you can send the mails from SAP.
Cheers!
Isuru
Hi Sir,
What is the meaning of ‘SuppressAlerts’ and ‘AggregateAlerts’? Could you please explain with example?
Hi Nagaraju,
SuppressAlerts let you avoid sending multiple emails on the same issue and AggrigateAlerts collects multiple alerts to send them in the same email.
Cheers!
Isuru
Hello,
Its an excellent blog.
I have a query without NWDS, how can we CRUD (Create read Update Delete) tables in SAP PI(not PO) 7.5 Single Stack
Thank you, Nikhil! The question is not clear. What do you mean by “CRUD tables in SAP PI”?
Hi Isuru,
you are great!
Good Job! Very helpful!
Keep doing.
Thanks and regards
René
That is very nice of you to say, thank you 🙂
Hi Isuru,
Is there any way to test the alert using any report rather than stopping the channel or making a change in the PI interface? We have already alert set up in the production system anyhow, suddenly few of the DL members stopped getting alert.
Thanks in advance!!!
Sonali
Hi
How to get an alert for Messages status Holding
Hi ISURU,
Can you please explain a little bit more about java mail client configuration like where we need to configure this and how?
Thanks
Hi Mayank,
Do u got any solution on this, even i am facing the same issue.
Thanks,
Venkatesh G
I am facing an error while activating the alert rule:
“No status details are assigned”.
Hi, das ist ein super Blog. Danke.
hier handelt es sich um Message Alerting. Gibt es noch andere? Ich möchte Zertifikate, Kanäle und BPM Nachrichten monitoren und dazu alarmiert werden. Kann man auch einstellen, wenn in diesem Szenario keine x Nachrichten Anzahl am Tag kommen, dass ich auch in diesem Fall alarmiert werde?
Grüße
Katja
Hi ISURU,
Amazing blog very clear explanation with picture to understand more and I am regularly following your blog & it helpful to a lot.
My question here is – this is 1st time I am creating this alert rule. I took this blog as reference and I have followed and created as it is but I tried to check this alert rule so I have stopped the Receiver communication channel and triggered the message but I don’t see any email notifications in inbox.
Can you please help me what other changes to do & get a email alert to mail inbox.
Thanks in Advance.
Regards
Swetha.
Hi,
I have configured Alert configuration as per the blog, i am receiving message failure alert but not receiving channel failure alerts.
Kindly help me on this.
Thanks in advacne!!
Hi Isuru,
I have configured alert config as per your blog in SAP PO 7.5 and getting mail alerts for message failures but channel failure not getting alerts.
Kindly help us to get channel failure email alerts.
Thanks in adavnce!!
Hello Isuru,
We need to know how we can give multiple email addresses in “TO” section i have tried giving them with, and ; separator but it’s not working pls help me
Hi
How can we create an alert for certification expiry?
I’m also looking. Please let us know if you have the solution.