Friday Mar 02, 2012

How to Reset a SOA 11g DMS Metric

What is DMS?

DMS stands for 'Dynamic Monitoring Service' and is a facility through which WebLogic Server and many of our deployed applications expose runtime information. At the top level there is a list of 'Nouns' and these Nouns have attributes where the specific values are populated.

To view the runtime DMS you can access the following URL on any running WebLogic instance:

http://<host>:<port>/dms/Spy

Login using the administrative credentials and you will see the following screen.


(click image to enlarge)


If SOA is deployed and running on the instance you will see a list of SOA related Nouns like the following:


(click image to enlarge)


Some of these simply state what is deployed such as the composite names, components, etc. Others provide runtime metrics for the SOA components such as the number of requests processed, the average time of those requests, etc. Most of these metrics are aggregated across composites and components.


Why Reset a Metric?


There could be several reasons for resetting a particular metric at runtime but the use case of concern here is when you have configured a WLDF Watch to monitor for some state. Here we are monitoring the average processing time of a BPEL Process in the 'soainfra_component' Noun. When the average time exceeds 5 seconds we want to trigger a Diagnostic Framework Incident and then we want to reset the Noun so we can continue monitoring it without triggering the Watch over and over and don't have to restart the server.

Here is what the metric looks like in Spy:


(click image to enlarge)


Our avg time is 1545 milliseconds. We run some load and push the avg processing time over our threshold of 5 seconds.


(click image to enlarge)


We'll assume that the Incident is generated and now we want to reset this particular metric. To do this we pass in some arguments to the Spy servlet through the URL.

Arguments:
  • operation: What operation do we want to perform?
  • format: What format is the data in
  • cache: What action to take on the cached data
  • name: The name of the object we want to reset
  • recurse: Do we want the reset to be recursive

Here are our values:
  • operation = reset
  • format = raw
  • cache = refreshall
  • name = <discussed below>
  • recurce = all

The 'name' is quite long and one way to get it is directly from the WLDF Watch configuration. Here is the expression that was used to create the Watch taken from the WLS console:


(click image to enlarge)


We're going to copy the 'name' from here and paste it into our reset URL. Here is the complete URL:

http://<HOST>:<PORT>/dms/Spy?operation=reset&format=raw&cache=refreshall&name=/soa_cluster_prod_jrockit_7001/soa_server1/soainfra/default/TestProject2/1.0/soa_a684ec4b-6c01-4901-979b-7c6b44bdee07/bpel/BPELProcess2&recurse=all

Every environment will be different and the name will change upon redeployment of the project.

An alternative approach is to build the 'name' value manually. It takes the form:

/<DOMAIN NAME>/<SERVER NAME>/<PROJECT DEPLOYMENT PATH>/<COMPOSITE NAME>/<COMPOSITE REVISION>/<COMPOSITE LABEL>/<COMPONENT TYPE>/<COMPONENT NAME>

The following fields can be pulled directly from the soainfra_component table in DMS Spy:
  • COMPOSITE NAME is the 'soainfra_composite' column
  • COMPOSITE REVISION is the 'soainfra_composite_revision' column
  • COMPOSITE LABEL is the 'soainfra_composite_label' column
  • COMPONENT TYPE is the 'soainfra_component_type' column
  • COMPONENT NAME is the 'Name' column


These fields can change depending in the DMS metric used so WLDF can help for establishing the template to be used going forward.

We paste the URL into our browser and make the request. Refreshing the metric in Spy we see that it has been reset:


(click image to enlarge)


We'll take a quick look at the 'soainfra_Binding' metric to confirm that only soainfra_component was reset:


(click image to enlarge)


You can reset all metrics with the following URL:

http://<HOST>:<PORT>/dms/Spy?operation=reset&format=raw&cache=refreshall&name=/&recurse=all


I hope this post is helpful to anyone interested in working with the DMS metrics and sheds some light on how they work.
About

This is the official blog of the SOA Proactive Support Team. Here we will provide information on our activities, publications, product related information and more. Additionally we look forward to your feedback to improve what we do.

Search

Categories
Archives
« March 2012 »
SunMonTueWedThuFriSat
    
1
3
4
5
6
7
8
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
31
       
Today