Skip to Content
Personal Insights

Automation of SAP PI/PO monitoring report using HTTP channel

Hi All,

 

I have seen few blogs for automating monitoring report but could not complete my scenario since my system is on 7.3 dual stack and REST channel could not be installed with the available SP level.

Therefore, i have used HTTP channel instead of REST to achieve the functionality.

 

There are few steps to view the monitoring report from the message servlet

At each step, we get inputs and we keep appending that inputs to the link and get the final link to get the monitoring results.

 

  1.  Get the XSD from the link below

http://<host>:<port>/mdt/monitor/MessageOverviewQuery.xsd

 

2.  Get the component views list from the below URL

http://<host>:<port>/mdt/messageoverviewqueryservlet

3. Get the time range to pull the monitoring report from the below URL

http://server:port/mdt/messageoverviewqueryservlet?component=<XIComponentName>&view=<ViewNameKey>

 

 

4. Get the monitoring results from the below link

http://server:port/mdt/messageoverviewqueryservlet?component=<XIComponentName>&view=<ViewNameKey>&begin=<IntervalBeginTime>&end=<IntervalEndTime>

 

 

5. Now to retrieve and process response you need xsd which will be obtain from below URL mentioned in step 1

http://<host>:<port>/mdt/monitor/MessageOverviewQuery.xsd

 

Here comes the Development part.

I have made use of ECC system since it is a dual stack, hence used the sync proxy scenario

It is a PROXY to HTTP sync scenario.

 

ESR Objects:

  1. Create a data type to receive inputs from ECC (date time range)

 

2. Create a data type for ECC to receive the monitoring response message from PI

 

3. Create message types for both the data types shown above

4. Now import xsd file external definition to request and get response from servlet

 

5. Create the outbound service interface and inbound service interface for these messages

 

 

6. Create Request mapping and response mappings for the message types created

Request Mapping – I have used a dynamic configuration UDF to dynamically pick the start and end date range and also the host, component and credentials to hit the servlet.

 

Below is the UDF created

 

Code:

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey keyurl = DynamicConfigurationKey.create(“http://sap.com/xi/XI/System/HTTP”, “TargetURL”);
String a = Host + “/mdt/messageoverviewqueryservlet?component=” + component + “&view=SR_ENTRY_OVERVIEW_XPI&begin=” + var1 + “&end=” +var2;
conf.put(keyurl, a);
return “”;

 

I have mapped only 2 fields in the target structure (Details and Text with source fields)

 

I am using parameterized mapping to maintain the host and component dynamically in the interface determination.

 

Response Mapping – I have used this mapping to map the response of monitoring servlet to Proxy response mapping structure

 

Header mapping contains simple mapping.

Row data – I have used a UDF to correctly map the data to the rows.

 

UDF code below:

int i=0, j=var2[0];
for(i=0;i<var1.length;i++)
{
if(i==j)
{
result.addValue(var1[i]);
}
}

 

7. Create Operation Mapping for this sync interface

 

ID part now:

  1. Create a Proxy sender channel to push data from ECC

  2. Create a receiver HTTP channel

Maintain the basic authentication required for this system

 

Also check the ASMA properties for this channel

3. Create sender agreement, receiver determination, interface determination (maintain parameters created in mapping) and receiver agreement.

 

ABAP Program:

selection screen – It contains the start/end time range and also email ID’s to whom we need to send the monitoring report.

 

We have maintained variants based on the day light savings as well.

Once the job is triggered, the ABAP report will fetch the java stack monitoring report from sync proxy and get the ABAP stack monitoring details from SXMB_MONI Tcode corresponding tables.

These details are maintained in an excel sheet and email is sent out to the team based on the email ID’s maintained in the variant.

Testing:

I have triggered this report with the date range and email ID

The email received in my inbox

 

Below is the format in which excel sheet is filled within the ABAP report (Excel sheet attached in above email)

 

We can customize the look and format of the excel sheet based on the ABAP coding done in the report.

 

Thanks,

Rohini Potham

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