Tue. Jun 2nd, 2020

Alert Engine of SAP PI 7.31

3 min read

An Alert Engine is available on AS ABAP and AS Java systems that support component-based message alerting. The engine receives alert events, compares them to the alert rules available on this engine, and generates alerts.

Receiving and Processing Alert Events

The engine can receive alert events from the following locations:

  • The local message processing runtime on the same system.
  • The external message processing runtime on an AS ABAP system that uses only the Alert Framework mechanism available in earlier SAP NetWeaver releases. Note that this can happen only for the Alert Engine on the central Advanced Adapter Engine.

The engine extracts the information from the configuration entities of the available alert rules and converts it (except Integration Flow) to message header rules. For each message processing error (alert event), the engine compares the header rules with the information available in the header fields of the message, or with the integrated configuration. Note that the engine processes separately the local alert events and those coming from external AS ABAP systems.

Generating Alerts

The Alert Engine generates an alert for an alert rule only when both of the following conditions are met:

  • There is at least one consumer subscribed for this alert rule. Make sure you add alert consumers when creating or editing an alert rule (including the default alert rule).
  • At least one header rule matches the runtime event. In case there is a match for one header rule, no other header rules in the same alert rule are evaluated.

The Alert Engine generates alerts specifically for each consumer of the matched alert rule. The engine does not stop the evaluation if it finds a matching alert rule; it evaluates all alert rules. The engine deletes the alert event after the alert rule evaluation is completed. In addition to the evaluation of the alert rules created by users, the Alert Engine also uses the default alert rule to create alerts for all alert events. This provides the following advantages when processing alert events:

  • In case there are no alert rules that match the alert event, the default alert rule applies for this event. Correspondingly, the Alert Engine creates alerts for all consumers assigned to the default alert rule.
  • In case the Alert Engine finds alert rules that match the alert event, it creates alerts for the consumers assigned to these rules. Since the default alert rule always applies for this event, the Alert Engine also checks which consumers are assigned to the default alert rule. If for some of them there is no alert created yet, it creates the corresponding alerts.
  • In case you want to have the simplest alerting setup, you can run the Alert Engine only with the default alert rule. This way you would not need to create custom alert rules that match particular configuration objects or message statuses.

Storing Generated Alerts

When the Alert Engine generates an alert for an alert consumer, it adds it to a local store specific for this consumer. This way the Alert Engine supports multiple consumers that can collect their events independently of each other by reading their own store.
The Alert Engine uses dedicated local stores for the incoming alert events and the generated alerts, and takes special care to prevent these stores from growing uncontrollably.

Leave a Reply

Your email address will not be published. Required fields are marked *