Monitor a WSDM resource with Tivoli Monitoring Universal Agent

Using WSDM Generic Collector Engine for the ITM Universal Agent to monitor a common product using WSDM Web services

Discover how you can use the IBM Tivoli® Monitoring (ITM) Universal Agent® to consume and monitor a Web Services for Distributed Management (WSDM)-compliant interface for a manageable resource. Learn how to download, install, and configure the ITM Universal Agent to monitor the Apache HTTP Server.

Share:

Kyle Croutwater (kylec@us.ibm.com), Senior Software Engineer, IBM

Kyle Croutwater is a Senior Software Engineer on IBM's Autonomic Computing team in Research Triangle Park, NC. He specializes in Self-Configuring and Self-Managing Autonomic technologies, as well as integration of software and IBM solutions. He recently led the design and development of the integrated middleware composite offering installer for the IBM Service Management product. Prior to joining IBM's Autonomic Computing team, Kyle was Chief Programmer and Customer Advocate for IBM Host Access Transformation Services. Kyle has spent his career at IBM writing communications and integration software. Kyle enjoys giving presentations to customers and helping them integrate their disparate software into a cohesive solution. He holds a Master of Science in Software Engineering from North Carolina State where he specialized in Artificial Intelligence and holds a B.S. in Electrical Engineering from the Ohio State University.



22 May 2007

Before you start

Learn what to expect from this tutorial, and how to get the most out of it.

About this tutorial

This tutorial shows you the benefits of the consistent manageability interface provided by the open Web Services for Distributed Management (WSDM) OASIS specification. It illustrates how to use IBM Tivoli Monitoring (ITM) to monitor any product conforming to the industry standard WSDM interface and demonstrates step by step instructions on how to monitor a common HTTP server with a WSDM interface from ITM.

What if you want to plan and build a WSDM interface

Then try these resources:

Objectives

In this tutorial, you learn the process of how to configure the IBM Tivoli Monitoring product to monitor a WSDM-compatible resource.

Prerequisites

This tutorial is written for administrators familiar with IBM Tivoli Monitoring whose skills and experience are at an intermediate level.

You should have a basic familiarity with Web Services Distributed Management (see Resources), and you should have also successfully executed the prerequisite tutorial, "Create a WSDM interface for an HTTP server using Apache Muse" -- this tutorial builds off of the WSDM artifacts created in that tutorial.

Alternatively, you may complete the tutorial "Create a WSDM endpoint using Build to Manage tooling from the Eclipse TPTP project" to perform the same operations using the Eclipse TPTP tooling, although there are some minor differences if you decide to use that tutorial.

System requirements

To run the monitoring application you create in this tutorial, you need to have the IBM Tivoli Monitoring Version 6.1 Universal Agent + ITM Fixpack 4 (or above) product installed on your system. The work is shown using a Microsoft®Windows®> console, but the tutorial can be completed by UNIX® and Linux® users as well.


Download and extract the WSDM Generic Collector Engine (WGCE) for ITM

The first step to monitoring a WSDM-compatible resource using ITM is to download the WSDM Generic Collector Engine (WGCE) from the IBM Tivoli Open Process Automation Library (OPAL). After you sign onto the site, download the WGCE to a directory on your local disk, such as C:\IBMUniversalCollectorDownload. Once the download is complete, unzip WSDMCollectorEngine.zip in your download directory and create a new directory CD_ROOT relative to your download directory (for example C:\IBMUniversalCollectorDownload\CD_ROOT).

Next, view the WGCE User's Guide. Open a folder showing the CD_ROOT directory that was created in the previous step. Open the file WSDMEngineUsersGuide.doc to view the guide. It contains an overview, features and functions, installation instructions, instructions for creating a custom WSDM collector, and information on serviceability, problem determination, and known problems and limitations.


Install the WSDM Generic Collector Engine

Change to the CD_ROOT directory and execute the appropriate installation program for your platform. For Windows users, run setupwin32.exe. For Linux users, run setupLinux.bin.

Follow the instructions on the InstallShield Wizard for ITM-Application Support to install the WGCE, as shown in Figure 1:

Figure 1. InstallShield welcome screen
InstallShield welcome screen

Click Next. In Figure 2, the directories are prefilled with the correct values.

Figure 2. Prefilled pathways
Prefilled pathways

Click Next. As in Figure 3, make sure to select Perform a local install of the solution in this machine.

Figure 3. Perform a local install of the solution in this machine
Perform a local install of the solution in this machine

Click Next. In Figure 4, select WSDM Collector Engine - 06.10.00.00.

Figure 4. Add support for WSDM Collector Engine
Add support for WSDM

Click Next. In Figure 5, review the actions that will be performed.

Figure 5. Review intallation actions
Review installation

Click Next to begin the install. Note: this will recycle TEMS.

Figure 6. Begin the install
Begin the install

The final summary should be displayed with the Installation completed successfully message.


Validate the WGCE

Now open the Tivoli Monitor Services window by selecting Start -> All Programs -> IBM Tivoli Monitoring -> Manage Tivoli Monitoring Services as shown in Figure 7:

Figure 7. Open the Tivoli Monitor Services window
Open the Tivoli Monitor Services window

The WSDM Generic Collector should appear in the console window as shown in Figure 8:

Figure 8. View the WSDM Generic Collector in the console window
View the WSDM Generic Collector in the console window

Configure and start the WGCE

Once the WGCE is either locally installed or remotely deployed to a TEMA, you need to configure it before it can run. The configuration is divided into two pages -- the "Java" and "Universal Agent" pages.

In the console window shown in figure 8, right click on WSDM Generic Collector and select Configure.

In the popup configuration panel, you may leave the defaults and click OK.

If the Status column for the WGCE is not started, right click on the WSDM Generic Collector and select Start.


Create a custom WSDM collector for the WGCE

This tutorial uses the WSDM manageability resource created in the prerequisite tutorial, "Create a WSDM interface for an HTTP server using Apache Muse" (see Resources). Alternatively, you can use the manageability resource built from "Create a WSDM endpoint using Build to Manage tooling from the Eclipse TPTP project" (see Resources). In the prerequisite tutorial, an endpoint was generated to act as a management interface to Apache Tomcat, utilizing WSDM on one side and communicating directly with the Apache Tomcat resource on the other. This exposed management interface is used in this tutorial to demonstrate how the ITM product monitors a WSDM-enabled resource.

Let's review the specifics of the WSDM endpoint created in the prerequisite tutorial and relate it to the collector file we will create.

The prerequisite tutorial created a custom capability, http, in addition to the provided Muse manageability capabilities, such as IdentityDescriptionManageabilityCharacteristics, and OperationalStatus. The http custom capability has properties ServerName, PortNumber, and ThreadsPerChild, as well as two operations, start and stop. The Manageable Endpoint type name is http and the Manageable Endpoint Namespace is http://www.example.com/http-server.

Note if you used the alternate tutorial, there are three differences you'll need to account for:

  • The Manageable Endpoint type name is HttpServer instead of http.
  • The Manageable Endpoint Namespace is http://www.example.com/HttpServer instead of http://www.example.com/http-server.
  • The port property is called Listen instead of PortNumber.

Chapter 4 of the WSDM Collector Engine User's Guide describes how to create a custom WSDM Collector and the elements of the XML schema for configuration. Follow the instructions in this chapter to create a single custom collector which is defined by one configuration file. Create the file in a directory on your machine, such as C:\itmcollectorfiles and call it http.xml. You can copy and paste the file contents from the example code below. No coding or compiling is involved other than putting together the XML configuration.

Note: Other collectors can be added using separate XML configuration files. You only need to install one collector file for any number of resources of the type that you want to monitor. Towards the end of the tutorial, you learn to monitor multiple HTTP server instances

Listing 1. Create the http.xml file
<?xml version="1.0" ?>
<itm_custom_collector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:AgentConfig="http://www.ibm.com" 
xsi:noNamespaceSchemaLocation="agent.xsd" 
mdl_name="HTTP" 
product_code="KWH" 
product_version="131"
product_short_description="Apache HTTP Collector">
   <attribute_group_list>
      <!--  -->
      <!-- The http-server attribute group definition. -->
      <!--  -->
      <attribute_group name="HT1" table_id="WSDMHT1" help_text="http-server Metrics" 
         number_of_expected_instances="LESS_THAN_100" ua_group_seperator="TAB">
         <handlers>
            <forTakeSample name="WSDMGeneric" domain_specific="scalarType" />
            <forDiscovery name="ServiceGroup" />
            <forResourceFilter name="CapabilityBased" 
                domain_specific="http://www.example.com/http-server" />
         </handlers>
         <attribute cnp_name="ServerName" help_text="The ServerName attribute.">
            <raw_attribute>
               <isDisplayString size="25" />
               <domain_specific 
                info= "{http://www.example.com/http-server}pfx6:ServerName" />
            </raw_attribute>
         </attribute>
         <attribute cnp_name="PortNumber" help_text="The PortNumber attribute.">
            <raw_attribute>
               <isCounter />
               <domain_specific 
                info="{http://www.example.com/http-server}pfx6:PortNumber" />
            </raw_attribute>
         </attribute>
         <attribute cnp_name="ThreadsPerChild" help_text="The ThreadsPerChild attribute.">
            <raw_attribute>
               <isCounter />
               <domain_specific 
                info="{http://www.example.com/http-server}pfx6:ThreadsPerChild" />
            </raw_attribute>
         </attribute>
      </attribute_group>
   </attribute_group_list>
</itm_custom_collector>

Look at the specifics of the XML code above that are unique to your http example.

The three properties we wish to display, ServerName, PortNumber, and ThreadsPerChild, are values of the cnp_name attribute in the attribute elements of the attribute_group HT1. HT1 is an arbitrary name you can choose that is displayed in ITM tree view under the collector resource. The Manageable Endpoint Namespace, http://www.example.com/http-server, is required as the value of the domain_specific attribute inside the <forResourceFilter> element.

Ensure the namespace (http://www.example.com/http-server) and variables (ServerName, PortNumber, ThreadsPerChild) in the Listing 1 http.xml match the ones you used in the prerequisite tutorial. If you followed the alternate tutorial, don't forget to make the namespace and property changes.

You can choose to display properties of other capabilities, such as ResourceID of the MUSE Identity capability, by specifying the appropriate name and domain_specific namespace within the attribute as in this XML fragment:

Listing 2. Display other properties in the http.xml file
 <attribute cnp_name="id" help_text="WSDM resource id" isKey="true">
 <raw_attribute>
  <isDisplayString size="250" /> 
  <domain_specific
                 info="{http://docs.oasis-open.org/wsdm/muws1-2.xsd}muws1:ResourceId" /> 
  </raw_attribute>
  </attribute>

If you decide to change the display variables, like name and table_id, in the Listing 2 XML, take care not to violate the required XML schema -- ITM has restrictions on these names which are defined in the schema file. This schema file is agent.xsd located in the directory ITM\TMAITM6\kwh\common\config relative ITM Installation Directory (C:\IBM2003\ITM\TMAITM6\kwh\common\config\agent.xsd in our example). ITM does not flag schema errors when loading the file, and if you have a schema error, the result will be that your agent does not work. You can validate that the file is consistent with the schema by loading this XML file in an XML editor, such as the one built into Eclipse, with the schema file, agent.xsd, located in the same directory as your collector xml file, http.xml.


Add the custom collector configuration to WGCE

Chapter 5 of the WGCE User's Guide describes the Take Action Commands and the command line interface. To add your newly created http.xml, follow the instructions below:

Open a command prompt window and go to the directory ITMInstallDir\ITM\TMAITM6. Register the http.xml file you created in the previous step.

Run the command kwh_addCollector -c C:\itmcollectorfiles\http.xml. This registers the http collector file you just created. You can add additional collector files to monitor other WSDM resources simultaneously.

>


Update the http project for Service Groups and advertisements of http capabilities

The WSDM interface created in the prerequisite tutorial was a basic one, so you need to add two additional things so you can monitor it from the ITM WSDM generic collector:

  • WSRF Service Groups to the http endpoint.
  • Advertisement of the http capability.

Add WSRF Service Groups to the http endpoint

Follow the instructions in the Apache Muse documentation for how to add WSRF Service Groups to an endpoint. This is required because ITM queries the service group to determine the capabilities.

Add advertisement of the http capability

Since WSDM does not require that a custom capability be advertised, the http endpoint created in the prerequisite tutorial did not advertise the http capability. Because the ITM Generic Collector queries the advertised capabilities, you must add this advertisement to the http endpoint.

Fortunately, MUSE provides a simple Abstract class which does the work, so you only need to change one line in the source file -- com/example/www/http_server/MyCapability.java file from our http example.

The javadoc for the class AbstractManageabilityCapability explains that it is an extension of AbstractWsResourceCapability that provides one additional initialization step: If the resource uses the >ManageabilityCharacteristics capability, then this capability's URI will be added to the muws1:ManageabilityCapability property.

Since this is all you need, the manual step is to replace the line in source file created in the prerequisite tutorial: com/example/www/http_server/MyCapability.java from:

public class MyCapability extends AbstractWsResourceCapability implements IMyCapability

to:

public class MyCapability extends AbstractManageabilityCapability implements IMyCapability.

Update project files

Below are the project files with the two previously mentioned changes included. These archives do not include the large MUSE library files in the WEB-INF/lib directory, so copy those in yourself. Ensure the HTTP Installation directory in this example is pointing to your Apache server as you did in the tutorial. Go to the Downloads section to get the following project files:

  • Eclipse Project Archive: http-management.zip.
  • Web Archive (WAR): http-management.war.

Start your WSDM http endpoint

Make sure you follow the instructions from the prerequisite tutorial to start your WSDM http endpoint in your Tomcat server using the catalina.bat run command. You should use the client proxy program created in the prerequisite tutorial to test your WSDM endpoint and ensure there is an instance created for the WSDM endpoint.


Validate the collector and craft an instance

Now it's time to validate the new collector and create an HTTP collector instance in ITM.

Start the Tivoli Enterprise Monitoring Service console by selecting Start -> Programs -> IBM Tivoli Monitoring -> Manage Tivoli Monitoring Services. Start the Tivoli Enterprise Portal (Browser or Desktop) by double clicking on the Tivoli Enterprise Portal in the Tivoli Enterprise Monitoring Services console as shown in Figure 9.

Figure 9. Start the Tivoli Enterprise Portal
Start the Tivoli Enterprise Portal

Since the WSDM Generic Collector is a collector for the Universal Agent, you must also make sure the Universal Agent and WSDM Generic Collector services, shown in Figure 9, are started. If they are not, you can right click on them and select Start.

Log on with valid credentials. The default user is sysadmin.

When the ITM Enterprise Portal appears, select the Physical view in the drop-down menu on the top left and expand Enterprise, the local machine, and Universal Agent. You should see your newly created HTTP collector under the Universal Agent.

The ITM Enterprise Portal is shown in Figure 10.

Figure 10. Welcome to the ITM Enterprise Portal
Welcome to the ITM Enterprise Portal

You should now right click on the HTTP collector in the ITM Enterprise Portal and select Take Action ... -> Select ... as shown in Figure 11:

Figure 11. Take action in the ITM Enterprise Portal
Take action in the ITM Enterprise Portal

For the Action, select WSDM Create Collector Instance (Figure 12):

Figure 12. Create an instance for the action
Create an instance for the action

It will prompt you for arguments for Collector_Name, instanceName, startupType, and description. For the Collector_name parameter, leave the filled in value of HTTP. For startupType, you can use manual or automatic. If you use manual, you need to manually perform a WSDM Start when you bring up your ITM server. You can use whatever values you would like for instanceName and description. This tutorial uses HTTPB for the instance name and Apache HTTP Server for the description. Enter the arguments, and click OK to create the instance.

When this command completes in a few seconds, notice an additional grayed-out node added to your tree for the HTTP instance as shown in Figure 13:

Figure 13. View the instance
View the instance

Perform a WSDM Start action

In the Tivoli Enterprise Portal, select WSDMINST in the Physical view tree, and you should see your newly created HTTPB instance displayed in the table at the bottom. If you chose manual as the startupType when you created the collector instance, you need to perform a WSDM Start action. If you chose automatic, you can skip this step.

In the bottom table, right click on the HTTPB instance and select Take Action -> Select ... as shown in Figure 14.

Figure 14. Take another action
Take another action

In the Take Action dialog that appears, the arguments should be prefilled with correct values. Click OK to start the instance.

Figure 15. If arguments are prefilled correctly, then take action
If arguments are prefilled correctly, then take action

After a few seconds, the HTTPB WSDM instance node in the Physical tree view should change from disabled (grayed out) to enabled.


Perform WSDM Discovery on instance

The only remaining action is to define which WSDM endpoints we should display in the newly created HTTP collector. This is done by performing a WSDM Discovery action in ITM. On the newly created collector instance, HTTPB, in the tree view of the Tivoli Enterprise Portal, right click and select Take Action ... -> Select ... as shown in Figure 16:

Figure 16. Take an action via WSDM Discovery
Take an action via WSDM Discovery

This time, for the Action, select WSDM Discovery:

Figure 17. Choose WSDM Discovery
Choose WSDM Discovery

For the Discovery_Type argument value, enter ServiceGroup. For the Action argument value, enter add. For the Infoargument value, enter the WSDM endpoint reference for the Service Group of the HTTP server you created in the prerequisite example, such as http://kyledesktop.raleigh.ibm.com:8080/http-management/services/ServiceGroup.

After entering the appropriate argument values, click OK.

The Tomcat WSDM http resource is now configured to the WGCE and is acting as a data provider to the Universal Agent. You may perform additional WSDM discovery actions to collect data from additional WSDM endpoints in this table.

Note that when you stop the WGCE service or the Universal Agent, it will not persist the discovered resources. You need to perform this discovery action whenever you recycle these agents or the ITM server.


View the results of the instance

If you select the HT1 node under the HTTPB instance in the tree of the Enterprise Portal window, you can now see in the table on the bottom of the Tivoli Enterprise Portal the values from your newly monitored WSDM resource.

Figure 18. View instance results
View instance results

See the trace of the flow from the collector to the WSDM agent

If you enable tracing in the WSDM endpoint or run the endpoint through a TCP/IP Monitor (such as the one included within Eclipse), you can observe the WSDM message flow between ITM and the WSDM endpoint. This is useful in understanding WSDM and ITM. It also shows you how you can take advantage of the open WSDM standard to perform discovery and management of WSDM manageability endpoints.

Following is the message flow:

  • ITM WSDM collector requests the entries of the ServiceGroup.
  • HTTP WSDM endpoint replies with the Server Group entry of the End Point Reference for the http WSDM endpoint.
  • ITM WSDM collector requests the property of the MUSE ResourceID for the WSDM endpoint.
  • HTTP WSDM endpoint replies with the MUSE ResourceID.
  • ITM WSDM collector requests the Manageability Capabilities of the http Resource.
  • HTTP WSDM endpoint replies with the Manageability Capabilities for the http custom capability (http-server), as well as the inherited MUSE capabilities (Identity, Description, ManageabilityCharacteristics, and OperationalStatus).
  • ITM WSDM collector requests the value of the desired properties using GetMultipleResourcePropertiesRequest.
  • HTTP WSDM endpoint replies with the property values for ServerName, PortNumber, and ThreadsPerChild.

If you're interested, we'll expand the flow to show the actual files:

In Listing 3, the ITM WSDM collector requests entries of the ServiceGroup.

Listing 3. ITM WSDM collector requests entries of the ServiceGroup
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://kyledesktop.
             raleigh.ibm.com:11182/http-management/services/ServiceGroup</wsa:To>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.
             oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest
        </wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">
             uuid:8acedf2f-1b35-7f37-fce8-83327ed39a00</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
            <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous
            </wsa:Address>
        </wsa:From>
        <muse-wsa:ResourceId
            xmlns:muse-wsa="http://ws.apache.org/muse/addressing"
            xmlns:wsa="http://www.w3.org/2005/08/addressing" 
                  wsa:IsReferenceParameter="true">MuseResource-1</muse-wsa:ResourceId>
    </soap:Header>
    <soap:Body>
        <wsrf-rp:GetResourceProperty
            xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" 
            xmlns:wsrf-sg="http://docs.oasis-open.org/wsrf/sg-2">wsrf-sg:Entry
        </wsrf-rp:GetResourceProperty>
    </soap:Body>
</soap:Envelope>

In Listing 4, the HTTP WSDM endpoint replies with the ServiveGroup entry of the End Point Reference for the HTTP WSDM endpoint .

Listing 4. HTTP WSDM Endpoint replies with the ServiceGroup entry
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" 
  xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header>
 <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
   <wsa:ReplyTo>
     <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
   </wsa:ReplyTo>
<wsa:MessageID>urn:uuid:7842E28E6858509F57117563242485934</wsa:MessageID>
<wsa:Action>http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/
            GetResourcePropertyRequest</wsa:Action>
<wsa:RelatesTo wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply">
     uuid:8acedf2f-1b35-7f37-fce8-83327ed39a00</wsa:RelatesTo>

</soapenv:Header>
<soapenv:Body><wsrf-rp:GetResourcePropertyResponse 
                       xmlns:tns="http://axis2.platform.core.muse.apache.org" 
                       xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
    <wsrf-sg:Entry xmlns:wsrf-sg="http://docs.oasis-open.org/wsrf/sg-2">
        <wsrf-sg:ServiceGroupEntryEPR>
            <wsa:Address>
              http://9.27.146.18:11182/http-management/services
                    /ServiceGroupEntry</wsa:Address>
           <wsa:ReferenceParameters>
              <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">
                          uuid:58508008-fcd0-6c79-4736-1e833b642ebd</muse-wsa:ResourceId>
            </wsa:ReferenceParameters>
        </wsrf-sg:ServiceGroupEntryEPR>
        <wsrf-sg:MemberServiceEPR>
            <wsa:Address>http://9.27.146.18:11182/http-management/services/http
            </wsa:Address>
            <wsa:ReferenceParameters>
                <muse-wsa:ResourceId 
                          xmlns:muse-wsa="http://ws.apache.org/muse/addressing">
                                MuseResource-7
                </muse-wsa:ResourceId>
            </wsa:ReferenceParameters>
        </wsrf-sg:MemberServiceEPR>
        <wsrf-sg:Content>
            <muws1:ResourceId 
                   xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
                         uuid:5b837a01-466f-8b4a-82fe-215f0cbb689c
            </muws1:ResourceId>
        </wsrf-sg:Content>
    </wsrf-sg:Entry>
</wsrf-rp:GetResourcePropertyResponse></soapenv:Body></soapenv:Envelope>

In Listing 5, the ITM WSDM Collector requests the property of the MUSE ResourceID for the WSDM endpoint.

Listing 5. ITM WSDM collector requests the property of the MUSE ResourceID
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
             http://9.27.146.18:11182/http-management/services/http
        </wsa:To>
        <wsa:Action 
             xmlns:wsa="http://www.w3.org/2005/08/addressing">
                   http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/
                        GetMultipleResourcePropertiesRequest
        </wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">
             uuid:d8049eb9-cfa2-687f-da69-222a953d5391
        </wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
           <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
              <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">
                          MuseResource-1
                </muse-wsa:ResourceId>
            </wsa:ReferenceParameters>
            <wsa:Address>
                 http://9.27.146.18:11182/http-management/services/ServiceGroup
            </wsa:Address>
        </wsa:From>
        <muse-wsa:ResourceId
            xmlns:muse-wsa="http://ws.apache.org/muse/addressing"
            xmlns:wsa="http://www.w3.org/2005/08/addressing" 
                  wsa:IsReferenceParameter="true">MuseResource-7
        </muse-wsa:ResourceId>
    </soap:Header>
    <soap:Body>
        <wsrf-rp:GetMultipleResourceProperties 
                 xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
            <wsrf-rp:ResourceProperty 
                 xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
                       muws1:ResourceId
            </wsrf-rp:ResourceProperty>
        </wsrf-rp:GetMultipleResourceProperties>
    </soap:Body>
</soap:Envelope>

In Listing 6, the HTTP WSDM endpoint replies with the Muse ResourceID.

.

Listing 6. HTTP WSDM endpoint replies
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" 
         xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">

 <soapenv:Header>
   <wsa:To>http://www.w3.org/2005/08/addressing/anonymous
   </wsa:To>
   <wsa:ReplyTo>
    <wsa:Address>http://www.w3.org/2005/08/addressing/none
    </wsa:Address>
   </wsa:ReplyTo>
  <wsa:MessageID>urn:uuid:7842E28E6858509F57117563242490636
  </wsa:MessageID>
  <wsa:Action>
       http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/
            GetMultipleResourcePropertiesRequest
  </wsa:Action>
  <wsa:RelatesTo wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply">
       uuid:d8049eb9-cfa2-687f-da69-222a953d5391
  </wsa:RelatesTo>
 </soapenv:Header>

 <soapenv:Body>
  <wsrf-rp:GetMultipleResourcePropertiesResponse 
           xmlns:tns="http://axis2.platform.core.muse.apache.org" 
           xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
      <muws1:ResourceId xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
             uuid:5b837a01-466f-8b4a-82fe-215f0cbb689c
      </muws1:ResourceId>
  </wsrf-rp:GetMultipleResourcePropertiesResponse>
 </soapenv:Body>
</soapenv:Envelope>

In Listing 7, the ITM WSDM collector requests the Manageability Capabilities of the HTTP Resources.

Listing 7. ITM WSDM collector requests the Manageability Capabilities
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
           http://9.27.146.18:11182/http-management/services/http
        </wsa:To>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
           http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/
                GetResourcePropertyRequest
        </wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">
           uuid:82b6d622-0614-d790-692c-2135e76019f0
        </wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
            <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous
            </wsa:Address>
        </wsa:From>
        <muse-wsa:ResourceId
            xmlns:wsa="http://www.w3.org/2005/08/addressing"
            wsa:IsReferenceParameter="true" 
                xmlns:muse-wsa="http://ws.apache.org/muse/addressing">MuseResource-7
        </muse-wsa:ResourceId>
    </soap:Header>
    <soap:Body>
        <wsrf-rp:GetResourceProperty
            xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" 
            xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
                  muws1:ManageabilityCapability
        </wsrf-rp:GetResourceProperty>
    </soap:Body>
</soap:Envelope>

In Listing 8, The HTTP WSDM endpoint replies with the Manageability Capabilities for the HTTP custom capability (http-server), as well as the inherited MUSE capabilities (Identity, Description, ManageabilityCharacteristics, and OperationalStatus).

Listing 8. HTTP WSDM endpoint replies with custom and inherited Manageability Capabilities
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" 
 xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">

 <soapenv:Header>
  <wsa:To>http://www.w3.org/2005/08/addressing/anonymous
  </wsa:To>
  <wsa:ReplyTo>
   <wsa:Address>http://www.w3.org/2005/08/addressing/none
   </wsa:Address>
  </wsa:ReplyTo>
  <wsa:MessageID>urn:uuid:7842E28E6858509F57117563242503138
  </wsa:MessageID>
  <wsa:Action>http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/
                   GetResourcePropertyRequest
  </wsa:Action>
  <wsa:RelatesTo wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply">
      uuid:82b6d622-0614-d790-692c-2135e76019f0
  </wsa:RelatesTo>
 </soapenv:Header>

 <soapenv:Body>
  <wsrf-rp:GetResourcePropertyResponse 
           xmlns:tns="http://axis2.platform.core.muse.apache.org" 
           xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
    <muws1:ManageabilityCapability 
           xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
                 http://docs.oasis-open.org/wsdm/muws/capabilities/Identity
    </muws1:ManageabilityCapability>
    <muws1:ManageabilityCapability 
           xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
                 http://www.example.com/http-server
    </muws1:ManageabilityCapability>
    <muws1:ManageabilityCapability 
           xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
                 http://docs.oasis-open.org/wsdm/muws/capabilities/Description
    </muws1:ManageabilityCapability>
    <muws1:ManageabilityCapability 
           xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
                 http://docs.oasis-open.org/wsdm/muws/capabilities/
                       ManageabilityCharacteristics
    </muws1:ManageabilityCapability>
    <muws1:ManageabilityCapability 
           xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd">
                 http://docs.oasis-open.org/wsdm/muws/capabilities/OperationalStatus
    </muws1:ManageabilityCapability>
  </wsrf-rp:GetResourcePropertyResponse>
 </soapenv:Body>
</soapenv:Envelope>

In Listing 9, the ITM WSDM collector request the value of the desired properties using GetMultipleResourcePropertiesRequest.

Listing 9. ITM WSDM collector requests the value of the desired properties
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
             http://9.27.146.18:11182/http-management/services/http
        </wsa:To>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
             http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/
                    GetMultipleResourcePropertiesRequest
        </wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">
             uuid:7b18a637-6e83-47be-b2b1-683595312e86
        </wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
            <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous
            </wsa:Address>
        </wsa:From>
        <muse-wsa:ResourceId
            xmlns:wsa="http://www.w3.org/2005/08/addressing"
            wsa:IsReferenceParameter="true" 
            xmlns:muse-wsa="http://ws.apache.org/muse/addressing">MuseResource-7
        </muse-wsa:ResourceId>
    </soap:Header>
    <soap:Body>
        <wsrf-rp:GetMultipleResourceProperties 
                 xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
            <wsrf-rp:ResourceProperty 
                     xmlns:pfx6="http://www.example.com/http-server">pfx6:ServerName
            </wsrf-rp:ResourceProperty>
            <wsrf-rp:ResourceProperty 
                     xmlns:pfx6="http://www.example.com/http-server">pfx6:PortNumber
            </wsrf-rp:ResourceProperty>
            <wsrf-rp:ResourceProperty 
                     xmlns:pfx6="http://www.example.com/http-server">pfx6:ThreadsPerChild
            </wsrf-rp:ResourceProperty>
        </wsrf-rp:GetMultipleResourceProperties>
    </soap:Body>
</soap:Envelope>

In Listing 10, the HTTP WSDM endpoint replies with the requested property values for ServerName, PortNumber, and ThreadsPerChild.

Listing 10. HTTP WSDM endpoint replies with the property values
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope 
         xmlns:wsa="http://www.w3.org/2005/08/addressing" 
         xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">

 <soapenv:Header>
  <wsa:To>http://www.w3.org/2005/08/addressing/anonymous
  </wsa:To>
  <wsa:ReplyTo>
   <wsa:Address>http://www.w3.org/2005/08/addressing/none
   </wsa:Address>
  </wsa:ReplyTo>
  <wsa:MessageID>urn:uuid:7842E28E6858509F57117563242518740
  </wsa:MessageID>
  <wsa:Action>
       http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/
              GetMultipleResourcePropertiesRequest
  </wsa:Action>
  <wsa:RelatesTo wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply">
       uuid:7b18a637-6e83-47be-b2b1-683595312e86
  </wsa:RelatesTo>
 </soapenv:Header>

 <soapenv:Body>
  <wsrf-rp:GetMultipleResourcePropertiesResponse 
           xmlns:tns="http://axis2.platform.core.muse.apache.org" 
           xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
    <pfx6:ServerName xmlns:pfx6="http://www.example.com/http-server">kyledesktop:80
    </pfx6:ServerName>
    <pfx6:PortNumber xmlns:pfx6="http://www.example.com/http-server">80
    </pfx6:PortNumber>
    <pfx6:ThreadsPerChild xmlns:pfx6="http://www.example.com/http-server">250
    </pfx6:ThreadsPerChild>
  </wsrf-rp:GetMultipleResourcePropertiesResponse>
 </soapenv:Body>
</soapenv:Envelope>

Add second resources and view data as a bar chart

You can use the data collected from the ITM WSDM Generic Data Collector the same as any other data collected in the ITM environment. Let's add one additional data source and create a graphic view to show one possibility.

Add a second WSDM endpoint

If you have a second HTTP WSDM endpoint, repeat the steps to perform a WSDM discovery operation on a second endpoint. A second row of data will now be added to the table when you select the HT1 node on the WSDM Collector instance in the Tivoli Enterprise Portal window, as shown in Figure 19.

Figure 19. Second data row is for the second endpoint
Second data row is for the second endpoint

Create a bar chart

Right click on the lower Report pane in Figure 19 and select Split Horizontally. You will see two report panes appear. Click on the bar chart icon on the tool bar at the top right of the Tivoli Enterprise Portal window and drag it to the newly created Report pane at the bottom of the window.

In the Select attribute popup, select ThreadsPerChild. You will now see a bar chart similar to the one shown in Figure 20.

Figure 20. A bar chart
A bar chart

You can right click on the chart and select Properties to add a legend and change the styles of the bar chart.


Monitor other WSDM endpoints

You can use ITM to monitor other WSDM endpoints, such as the WebSphere collector that ships as a sample with the WGCE. You can obtain the IBM WebSphere Application Server Feature Pack for Web Services and monitor it through the included WebSphere collector as shown in Figure 21:

Figure 21. Monitoring other WSDM endpoints
Monitoring other WSDM endpoints

Enable tracing to see missing data

If you do not see data returned from your ITM WGCE, one way to learn more information is to enable tracing. You can enable tracing on an instance of the ITM WGCE instance by changing the value in the resource's property file. For the example created in this tutorial, this file is located in the directory ITM\TMAITM6\kwh\apps\HTTP\config\HTTPB.properties relative to your ITM installation directory. This file contains a property JAVA_TRACE_LEVEL which is set to DEBUG_MIN by default. You can change this property to DEBUG_MAX and when you do, additional trace files will be created in the directory ITM\logs for the instance, such as HTTP_HTTPB_trace.log. This can help narrow down any problems you may be seeing.

You may also check other log files in this directory, such as common_log_UA_trace.log, to see additional information from the Universal Agent on which the ITM WSDM Generic collector depends.


Conclusion

This tutorial showed you how to use the IBM Tivoli Monitoring (ITM) Universal Agent to consume and monitor a WSDM interface for a manageable resource. You now have the ability to quickly configure ITM to monitor the WSDM endpoints you created in the prerequisite tutorial. By using the tools you have gained in this tutorial, you can take advantage of the open WSDM standard to perform discovery and management of WSDM manageabilty endpoints.


Downloads

DescriptionNameSize
Updated project fileshttp-management.zip192KB
Updated project fileshttp-management.war182KB

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Tivoli (service management) on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Tivoli (service management), Tivoli, SOA and web services
ArticleID=224229
ArticleTitle=Monitor a WSDM resource with Tivoli Monitoring Universal Agent
publish-date=05222007