Michal’s PI tips: How to get RWB message overview data to an external system?
As you probably know there are no web services for displaying RWB message overview data and this has been an issue for some companies which wanted to use their own tools to check aggragated message status. SAP has come up with a different way to handle this requirement – they have come up with a servlet which allows to retrieve the RWB monitoring data with an HTTP call.
When can we use this new servlet ?
You can use this servlet anytime you need to send the RWB message overview data to an external system or if the external system can query the servlet itself. You can use PI’s HTTP adapter to get the data from the servlet and share it as anything that PI supports (XML file, SOAP calls, e-mails, etc.)
How to use this servlet ?
First you need to get the XSD which describes the XML result of querying the servlet. You can get it with address:
You need to check which components you can query. You can do this by checking address:
At the bottom of this service you should be able to see the components you can use in the HTTP post.
So now your query would look like: http://server:port/mdt/messageoverviewqueryservlet?component=<XIComponentName>
The third thing you need to add to your query would be the view. There are 4 types of views you can use:
a) R_ENTRY_VIEW_XPI – Message status sorted by receiver
b) S_ENTRY_VIEW_XPI – Message status sorted by receiver
c) SR_ENTRY_VIEW_XP – Message status sorted by sender and receiver (detail view)
d) SR_ENTRY_OVERVIEW_XPI – Message status sorted by sender and receiver (overview)
Now your query would be: http://server:port/mdt/messageoverviewqueryservlet?component=<XIComponentName>&view=<ViewNameKey>
The last thing you need to add to your query would be the start and end date of the query. If you start your HTTP post with this address: http://server:port/mdt/messageoverviewqueryservlet?component=<XIComponentName>&view=<ViewNameKey> you will see sample start and end dates in the format respected by the servlet.
Now your full query should look like this:
Sample result from my test system would can be like shown below.
What are the prerequisites:
For the prerequisites please have a look:
Note 1400785 – Message Overview: automatic query of data with a servlet
Excelent blog and wonderful new for me. isn't there any problem to combine it with the alert configuration?
you can do anything you need with this info - my client (a year ago) wanted to know the percentange of successfull messages to not successfull so we've pushed it to BW but you can get the data with HTTP and start a function module for alerts easily,
as usual, excellent blog and very helpful information!
I wonder if there is another API or Servlet that allows the retrieval of RWB performance data.
Are you aware of something like this?
thanks for this post!
Can you please provide some examples for the timeperiod. I'm a little bit confused, which format should be used. I'm always receiving a error like PERIOD_NOT_FOUND.
just have a look at the screenshot in step 4 - all periods with examples 😉
thank you very much. Now it works 🙂
Hello Michal, Good day, the XSD says that the field is "Results" (plural) but in the response of the servlet is seen to be "Result" (singular), additionally the XSD says that the fields are "qualified" but in the response of the servlet fields do not have the namespace. For example I have a interface that runs the servlet and stores the information in a table and generates error because the XSD says one thing and the answer of the servlet is another, you know that can be due, thank you very much for the support.
Is it possible to just fetch the message logs from PI system based on the message ID as an input ?