Beruflich Dokumente
Kultur Dokumente
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. 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.
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
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.
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.
Created the scenario SOAP to Proxy with simple integration engine Configuration .
Prerequisites::
SAP_XI_ADMINISTRATOR,SAP_XI_CONTENT_ORGANIZER, SAP_XI_CONFIGURATOR, or SAP_XI_DEVELOPER roles is assigned to the user who is configuring the same .
The system is configured to send mail or sms means <SCOT> is perfect configured .
Step 1 - When you want to use the new component-based message alerting maintain first alert parameter in integration engine configuration Go to sxmb_adm->integration engine configuration then add two new parameter Category "Monitor" ALERTING_IS_ACTIVE value 1 and ALERTING_TARGET value 1.
Use of parameter ALERTING_IS_ACTIVE is to switch on alerting for this run time engine . use of parameter ALERTING_TARGET to switch on component-based message alerting .
step 2-
Step3 - Define alert rule . go to http://host:port/pimon Configuration and administration->message alert configuration. here select your alert rule, click on edit then add and define your component from where you want to trigger alert . As I am selecting configuration scenario .
Step-4 Now we need to create distribution list on abap stack .. go to SO23 and create distribution list , in distribution list enter e-mail address of users who should be notified when there are alerts .
Step-5
Consumer of PI Alert: The name of the local alert consumer added to the alert rule. The default is ALERT-TO-MAIL. Max chunk size for alerts read: The amount of alerts read by the program from the alert queue in the system. The default value is 5000. Max detailed records in e-mail: The number of individual message details that would be included in the e-mail notification. The default value is 20.
Distribution List: The name of the distribution list you configured as described above.
Step-6 Now we need to schedule a background . Go to sm36 then define a job . Give any appropriate job name click step button provide name of abap program and variant which we just created .
Click start condition and provide appropriate value and finally save and release the job . You can check it on sm37 for monitor perspective .
Testing : when i restart the failed message from sxi_monitor.I get the notification on my mail inbox that ...
1 messages failed for "Alert_Demo" on "is.85.dx1s01" Root cause: The first 1 messages of that data collection: _ Message1: MsgID: " " Timestamp: " " FromService: " " Interface: " " Namespace: " " ErrCat: "Application" ErrCode: "EXCEPTION_DURING_EXECUTE" ErrText: " "..
Property
mail.from
Default Value
mymail@sap.com
Description Specifies the sender of the mail message, that is, the value of the mail from header. Specifies the SSL certificate to be used for authentication if the connection is secure. The certificate must already be available in the Key Store. Specifies if the Session object bound to the naming system has the debug option enabled.
sslCertificate
default
mail.debug
false
If you set this property to true, the JavaMail Client Service logs debug information. Specifies the default host name for sending and receiving mail. This default value is used if the mail.<protocol>.host property is not set. Specifies the default store protocol. The method getStore() of the Session object returns a Store object which implements this protocol. Specifies the default transport protocol. The method getTransport() of the Session object returns a Transport object which implements this protocol. Default user name for connecting to the mail server. Used if there are no user names set for the specific protocols (mail.<protocol>.user). Default password for connecting to the mail server. Used if there are no passwords set for the specific protocols (mail.<protocol>.password).
mail.host
localhost
mail.store.protocol
pop3
mail.transport.protocol
smtp
mail.user
mail.password
Property
mail.imap.user
Default Value
Description Specifies the user name to be used for connecting to the Internet Message Access Protocol (IMAP) server. Specifies the password to be used for connecting to the Internet Message Access Protocol (IMAP) server. Specifies the host name of the Internet Message Access Protocol (IMAP) server. Used if the connect() method does not specify a port explicitly.
mail.imap.password
mail.imap.host
mail.imap.port
143
If this property is not set, the default IMAP port applies. If the IMAP server supports the PROXYAUTH extension, this property specifies a user name to be used with the PROXYAUTH command. If set to true, the property enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection, before issuing any login commands. Note An appropriate trust store must be configured so that the client trusts the certificate of the server. Specifies the user name to be used for connecting to the secure Internet Message Access Protocol (IMAPS) server. Specifies the password to be used for connecting to the secure Internet Message Access Protocol (IMAPS) server. Specifies the host name of the secure Internet Message Access Protocol (IMAPS) server. Used if the connect() method does not specify a port explicitly.
993
mail.imap.proxyauth.user
mail.imap.starttls.enable false
mail.imaps.user
mail.imaps.password
mail.imaps.host
mail.imaps.port
If this property is not set, the default IMAPS port applies. If the IMAPS server supports the PROXYAUTH extension, this property specifies a user name to be used with the PROXYAUTH command. If set to true, the property enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection, before
mail.imaps.proxyauth.user
mail.imaps.starttls.enable false
Property
Default Value
Description issuing any login commands. Note An appropriate trust store must be configured so that the client trusts the certificate of the server.
mail.pop3.user
Specifies the user name to be used for connecting to the Post Office Protocol version 3 (POP3) server. Specifies the password to be used for connecting to the Post Office Protocol version 3 (POP3) server. Specifies the host name of the Post Office Protocol version 3 (POP3) server. Used if the connect() method does not specify a port explicitly.
110
mail.pop3.password
mail.pop3.host
mail.pop3.port
If this property is not set, the default POP3 port applies. Specifies the user name to be used for connecting to the secure the secure Post Office Protocol version 3 (POP3S) server. Specifies the password to be used for connecting to the secure the secure Post Office Protocol version 3 (POP3S) server. Specifies the host name of the secure Post Office Protocol version 3 (POP3S) server. Used if the connect() method does not specify a port explicitly.
995
mail.pop3s.user
mail.pop3s.password
mail.pop3s.host
mail.pop3s.port
Specifies the user name to be used for connecting to the Simple Mail Transfer Protocol (SMTP) server. Specifies the password to be used for connecting to the Simple Mail Transfer Protocol (SMTP) server. Specifies the host name of the Simple Mail Transfer Protocol (SMTP) server. Used if the connect() method does not specify a port explicitly. If this property is not set, the default SMTP port applies. If set to true, use the AUTH command for authentication.
mail.smtp.password
mail.smtp.host
mail.smtp.port
25
mail.smtp.auth
false
Property
mail.smtp.submitter mail.smtps.user
Default Value
Description Specifies the responsible submitter of the mail message. Specifies the user name to be used for connecting to the secure Simple Mail Transfer Protocol (SMTPS) server. Specifies the password to be used for connecting to the secure Simple Mail Transfer Protocol (SMTPS) server. Specifies the host name of the secure Simple Mail Transfer Protocol (SMTPS) server. Used if the connect() method does not specify a port explicitly. If this property is not set, the default SMTPS port applies. If set to true, use the AUTH command for authentication. Specifies the responsible submitter of the mail message. Specifies the user name for connecting to the Network News Transfer Protocol (NNTP) server. Specifies the password for connecting to the Network News Transfer Protocol (NNTP) server. Specifies the host name of the Network News Transfer Protocol (NNTP) server. Used if the connect() method does not specify a port explicitly.
mail.smtps.password
mail.smtps.host
mail.smtps.port
465
false
mail.nntp.password
mail.nntp.host
mail.nntp.port
119
Related Content