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. 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
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Component-Based Message AlertingComponent-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.
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:
make it Yes on Parameter Enabled and Enabled in parameter Payload in alert .
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 .
Click start condition and provide appropriate value and finally save and release the job .
You can check it on sm37 for monitor perspective .
Now we are done with configuration .
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: " "..
The JavaMail Client Service owns a set of properties that allow you to configure the behavior of the service.
Note
The JavaMail Client Service properties starting with mail. define settings for communication with the mail server and you can use them in any mail application. If these properties are set, you do not need to specify this configuration further in the application code.
You can change these properties using SAP NetWeaver Administrator.
More information: Java System Properties
JavaMail Client Service Properties
Property Default Value Description
mail.from [email protected] Specifies the sender of the mail message, that is, the value of the mail from header.
sslCertificate default
Specifies the SSL certificate to be used for authentication if the connection is secure.
The certificate must already be available in the Key Store.
mail.debug false
Specifies if the Session object bound to the naming system has the debug option enabled.
If you set this property to true, the JavaMail Client Service logs debug information.
mail.host localhostSpecifies the default host name for sending and receiving mail. This default value is used if the mail.<protocol>.host property is not set.
mail.store.protocol pop3
Specifies the default store protocol.
The method getStore() of the Session object returns a Store object which implements this protocol.
mail.transport.protocol smtp
Specifies the default transport protocol.
The method getTransport() of the Session object returns a Transport object which implements this protocol.
mail.user
Default user name for connecting to the mail server.
Used if there are no user names set for the specific protocols (mail.<protocol>.user).
mail.passwordDefault password for connecting to the mail server.
Used if there are no passwords set for the specific
mail.imap.user Specifies the user name to be used for connecting to the Internet Message Access Protocol (IMAP) server.
mail.imap.password Specifies the password to be used for connecting to the Internet Message Access Protocol (IMAP) server.
mail.imap.host Specifies the host name of the Internet Message Access Protocol (IMAP) server.
mail.imap.port 143
Used if the connect() method does not specify a port explicitly.
If this property is not set, the default IMAP port applies.
mail.imap.proxyauth.userIf the IMAP server supports the PROXYAUTH extension, this property specifies a user name to be used with the PROXYAUTH command.
mail.imap.starttls.enable false
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.
mail.imaps.userSpecifies the user name to be used for connecting to the secure Internet Message Access Protocol (IMAPS) server.
mail.imaps.passwordSpecifies the password to be used for connecting to the secure Internet Message Access Protocol (IMAPS) server.
mail.imaps.host Specifies the host name of the secure Internet Message Access Protocol (IMAPS) server.
mail.imaps.port 993
Used if the connect() method does not specify a port explicitly.
If this property is not set, the default IMAPS port applies.
mail.imaps.proxyauth.userIf the IMAPS server supports the PROXYAUTH extension, this property specifies a user name to be used with the PROXYAUTH command.
mail.imaps.starttls.enable falseIf set to true, the property enables the use of the STARTTLS command (if supported by the server) to switch
JavaMail Client Service Properties
Property Default Value Descriptionthe 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.
mail.pop3.user Specifies the user name to be used for connecting to the Post Office Protocol version 3 (POP3) server.
mail.pop3.password Specifies the password to be used for connecting to the Post Office Protocol version 3 (POP3) server.
mail.pop3.host Specifies the host name of the Post Office Protocol version 3 (POP3) server.
mail.pop3.port 110
Used if the connect() method does not specify a port explicitly.
If this property is not set, the default POP3 port applies.
mail.pop3s.userSpecifies the user name to be used for connecting to the secure the secure Post Office Protocol version 3 (POP3S) server.
mail.pop3s.passwordSpecifies the password to be used for connecting to the secure the secure Post Office Protocol version 3 (POP3S) server.
mail.pop3s.host Specifies the host name of the secure Post Office Protocol version 3 (POP3S) server.
mail.pop3s.port 995
Used if the connect() method does not specify a port explicitly.
If this property is not set, the default POP3S port applies.
mail.smtp.user Specifies the user name to be used for connecting to the Simple Mail Transfer Protocol (SMTP) server.
mail.smtp.password Specifies the password to be used for connecting to the Simple Mail Transfer Protocol (SMTP) server.
mail.smtp.host Specifies the host name of the Simple Mail Transfer Protocol (SMTP) server.
mail.smtp.port 25Used if the connect() method does not specify a port explicitly. If this property is not set, the default SMTP port applies.
JavaMail Client Service Properties
Property Default Value Description
mail.smtp.auth false If set to true, use the AUTH command for authentication.
mail.smtp.submitter Specifies the responsible submitter of the mail message.
mail.smtps.user Specifies the user name to be used for connecting to the secure Simple Mail Transfer Protocol (SMTPS) server.
mail.smtps.password Specifies the password to be used for connecting to the secure Simple Mail Transfer Protocol (SMTPS) server.
mail.smtps.host Specifies the host name of the secure Simple Mail Transfer Protocol (SMTPS) server.
mail.smtps.port 465Used if the connect() method does not specify a port explicitly. If this property is not set, the default SMTPS port applies.
mail.smtps.auth false If set to true, use the AUTH command for authentication.
mail.smtps.submitter Specifies the responsible submitter of the mail message.
mail.nntp.user Specifies the user name for connecting to the Network News Transfer Protocol (NNTP) server.
mail.nntp.password Specifies the password for connecting to the Network News Transfer Protocol (NNTP) server.
mail.nntp.host Specifies the host name of the Network News Transfer Protocol (NNTP) server.
mail.nntp.port 119
Used if the connect() method does not specify a port explicitly.
If this property is not set, the default NNTP port applies.