Skip to Content

We could generate the alert emails using CBMA. But here I will describe the steps to generate the structured alert email .

You can follow the blog Interface specific Email Alert in PO using CBMA until Step3 and configure the alert. But instead of Step4, follow below steps.

  • Create a text File which will act as a template of the email body like below.

pic1.JPG

You can use the below list of variables in the template file to get the corresponding value from RunTime.

$severity$: Alert Rule severity

$alert_rule_id$: Alert Rule internal ID

$alert_rule_name$: Alert Rule name

$timestamp$: Alert creation time

$pi_component$: SLD instance name of the PI component that created the Alert

$scenario_id$: internal Integrated Configuration or IFLOW scenario ID

$scenario_name$: a readable scenario name for the Integrated Configuration or IFLOW scenario (note: this variable is only available with

the patch from note 2160374)

$error_category$: Error Category

$error_code$: Error Code

$error_label$: Error Label

$error_text$: Error Text

$error_parameters$: Additional error parameters

$msg_id$: Message ID of the PI message

$msg_from_party$: Sender Party of the PI message

$msg_from_component$: Sender Component of the PI message

$msg_to_party$: Receiver Party of the PI message

$msg_to_component$: Receiver Component of the PI message

$msg_interface$: Interface Name of the PI message

$msg_interface_namespace$: Interface Namespace of the PI message

$uds_attributes$: User Defined data from the PI message

$adapter_type$: Adapter Type

$adapter_namespace$: Adapter Namespace

$channel_name$: Communication Channel name

$channel_party$: Communication Channel party name

$channel_component$: Communication Channel component name

$monitoring_url$: URL link to Message Monitoring for the failed message (Http URL)

$secure_monitoring_url$: URL link to Message Monitoring for the failed message (Https URL)

  • Upload that text file in such a PO directory so that the location/file is readable by PO system. In my case I uploaded that under “/usr/sap/instanceID

pic1.JPG

  • Once uploaded,we need to schedule the AlertConsumerJobV2.

To do that go to NWA> Operations > Jobs > Java Scheduler > Task.

Click on Add and then select AlertConsumerJobV2.

pic1.JPG

Click Next and there you can change the TaskName and Description as per your wish. I kept that as it was.

pic1.JPG

On the next page you need to provide the parameters like EmailTemplateFile,Consumer,MailFrom,MailTo etc.

pic1.JPG

In my case I kept the below values.

Language:en

EmailTemplateFile:/usr/sap/instanceID/EmailTemplateTEST2.txt

Consumer:ALERT-TO-STRUCTURED-MAIL(This is the consumer which is used/created in the AlertRule in ID)

MailFrom:The alert email generator email ID

MailTo:The desired recipient for this alert

Then click on next and schedule the alert.

pic1.JPG

pic1.JPG

Now click On Finsh.

Now the alert email should be looking like below.

pic1.JPG

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Ivan Shashurin

    Hello.

    Can you please explain variable $uds_attributes$? At your post written:

    UDS Attributes: $SearchName$

    Where you define SearchName value? Is it value from NWA / SOA / Monitoring / User-Defined Message Search Configuration? Is it name of filter? Is it name of Search Criteria?

    (0) 
  2. Vaibhav Mishra

    Hi Arijit,

    We have followed all the steps mentioned above and created the email body template.

    But still we are not getting the alerts in specified format (we are still getting the alerts in standard format).

    Below is the screenshot of our scheduled job and the email template.

    AlertEmail Job details.PNG

    Here it is showing that the alert has been consumed.

    AlertEmailTemplate.PNG

    So could you please help us to know if we are missing some steps.

    (1) 

Leave a Reply