Nothing Special   »   [go: up one dir, main page]

Alert Configuration For SAP PI PO 1702036307

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Alert Configuration in Process Orchestration

Introduction
SMTP (Simple Mail Transfer Protocol) is a protocol that enables e-mail exchange between the SAP
System and any SMTP mail server, without requiring additional external components.

To configure SMTP in PO 7.5 single stack using Alert Rule feature to create alerts in Integration
Directory by specifying alert rule and assigning PI Objects to that rule.

SMTP is used to send Email Notifications directly to the Inbox. Alert rule is used to set alerts based
on interfaces. It gives more flexibility and usability.

Overview of Alert Process in PI


Discover the power of proper alert configuration in SAP PI single stack. Whenever a message error
occurs in PI, an error status is recorded. The Alert Engine evaluates the error information or alert
events from the PI runtime and checks for matching Alert Rules and configuration to determine if an
alert should be generated. Proper configuration of alerts can greatly influence the generation of
alerts. Join me as I guide you through the process of configuring alerts in SAP PI single stack.

In SAP PO, you can use either component-based message alerting or classic message-based alerting
(available only in the ABAP stack.) We ’ll focus on the recent component-based message alerting
because it is more suitable for a Java-only installation.

To support this alert mechanism, SAP PO includes an alerting infrastructure that uses the following
components:

▪ A central configuration in which users can create alert rules. The alert rules need to be
configured for each SAP PI domain; the created alert configurations are in the Integration
Directory.
▪ A local alert engine is present in each SAP PI runtime component and AAE. The alerts
triggered by the local alert engine are stored in a local alert store.
▪ Applications interested in consuming the generated alerts are also referred to as alert
consumers. Alert consumers can read alerts from the local alert store and send
notifications via email, fax, or SMS. The alert store contains a sub store for each
registered alert consumer, so each consumer reads alerts from its own alert inbox.
Alert Configuration in Process Orchestration

Alert Runtime Process Overview:

Creating an Alert Rule


There are two ways to create and maintain an alert rule: via the SAP NetWeaver Administrator or via
the Integration Builder.

Via the SAP NetWeaver Administrator


To create a new rule via the SAP NetWeaver Administrator, follow these steps:

1. Log in SAP NetWeaver Administrator, and navigate to the SOA tab. Select the Monitoring tab,
and click on Message Alert Configuration.
Alert Configuration in Process Orchestration
2. Click on New button on the top-left side of the tool bar.

3. You will see a menu from which you can choose either Alert Rule or Default Alert Rule.

▪ The Default alert rule is unique and is automatically created with the standard name
DEFAULT_ALERTRULE. Furthermore, the name and description cannot be changed.
Also note that you cannot freely assign configuration objects to the default alert rule,
and it applies to all message statuses. However, you can specify runtime components
and add consumers.
▪ When creating an alert rule, you are given carte blanche to define the name and
description to suit your needs. As opposed to the default alert rule, an alert rule is meant
to be more specific.

4. From the General tab, give a name and description to your rule. Additionally, fill in the
following fields:

o Enabled
Set Whether the alert should be enabled right away. You can disable an alert at any
point by changing this value. Enabling alert is an important step because only when
it’ s enabled can it be activated or deployed to runtime.
Alert Configuration in Process Orchestration

o Payload in alert
Set to enabled or disabled depending on whether you want the payload (actual XML
message) to be included in the alert or not. Enabling the payload requires (as a
prerequisite) the user-defined search capability to be configured.

o Severity
Specify the severity of the alert (Low, Medium, High, or Very High).

5. In the Message Header Rules tab, click on the Add button to include the Integration Director
configuration objects in your rule. You will see another submenu with different Integration
Directory categories (Party, Integration Flow, Service Interface, Integration Flow, etc.). After
selecting a particular category, you will see a pop-up in which you can select the actual
object.

6. In the Components tab, you can select the runtime components to be affected by the alert
rule.

7. In the Message Statuses tab, you can select which types of errors should trigger an alert. The
error statuses are grouped and categorized by components. This is an extensive list,
containing categories such as Channel, Adapter Type, Runtime, Validation, Virus Scan, and so
on. Make your selections per your requirements.
Alert Configuration in Process Orchestration

8. Save your settings.

9. Activate the rule. After activation, the rule will be pushed to the different runtimes. The
activation is an asynchronous process. After a successful activation, the rule becomes green.
The status of the rule activation can be further checked in the General tab of the alert rule.

Via Integration Directory


To create an alert in the Integration Directory, follow these steps:

1. Launch the Integration Directory from the SAP PO landing page.


Alert Configuration in Process Orchestration
2. Right-click under the Alert Rule section, and click New.

3. You can specify interface-related objects such as Integrated Configuration Object (ICO),
Configuration Scenario, Communication Component, etc., If you select ICO or Configuration
Scenario, alerts get generated for errors that occur in any stage of the message processing
pipeline and for all interface components include in ICO.

4. Select the extended tab and you will see the list of adapters and other message process like
mapping, runtime etc.

5. 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
Alert Configuration in Process Orchestration
generated based on either error which take place in different adapters or other runtime
errors such as message mapping.

6. Include the consumer’s 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 alerts as an email, let us include the consumer as ALERT-
TO-MAIL. (EXTEND).

7. If you have 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:
1. ALERT-TO-MAIL-OTC: Assign Interface Runtime Components of Order to Cash (OTC)
functional area to this Alert Rule and Consumer.
2. ALERT-TO-MAIL-P2P: Assign Interface Runtime components of Purchase to Pay (P2P)
functional area to this Alert rule and Consumer.

Configure Java Client for email notifications


This step will be done in NWA so you should have proper roles to perform this or you can ask BASIS
team to configure for you.

Configuration → Infrastructure → Java system properties → Services → Java Mail Client

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
Alert Configuration in Process Orchestration

Schedule a job
In this step, you need to schedule a job which will run to send the alert to concern team

Then configure the properties and details of the task. Configure consumer as “ALERT-TO-MAIL” and
MailTo as the email address of the user who should receive the notification.
Alert Configuration in Process Orchestration

Set the start time and the frequency of the job. I have set the frequency as every 1 hour.
Alert Configuration in Process Orchestration

Result:
I stopped the receiver file channel of the Integration Scenario to create couple of messages with
errors.

Message error details

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.

Alert consumer java job has consumed the 2 Alerts generated.

Conclusion

• Alerts trigger a mail directly to inbox. You can know the errors in interface without checking
the monitoring page in PO.
• You can include one or more mail ids using comma in “TO” parameter to inform error
information in the interface.
• You can easily configure standard and custom process for alerts in SAP PO.

Document Created by
Lakkaraju Hariteja.

You might also like