310 Problem Determination Using Self-Managing Autonomic Technology
9.2 Scenario development and implementation
The development, implementation, and execution of this example scenario is
divided into modules, as shown in Table 9-1.
Table 9-1 Example scenario modules
All the modules created in this chapter are available for download. Refer to
Appendix A, “Additional material” on page 379 for details about how to obtain
these modules.
In order to develop the self-managing autonomic capabilities of this scenario, the
following IBM Autonomic Computing Toolkit Version 2.0 tools and technologies
must be installed on both the application and database nodes:
򐂰 Autonomic Management Engine V1.1
򐂰 Resource Model Builder V1.3
Modules Content
Database node module one Resource model that monitors the CBE DB2 log
file using ITL. The resource model analyzes the
events and takes action in case it finds a database
instance down event. The action taken restarts the
database instance.
Database node module two Generic Log Adapter (GLA) context to convert log
information created by DB2 into CBE format.
Common Base Events will be stored into a CBE
DB2 log file by the GLA outputter.
Database node module three A second context for the GLA created in database
node module two. This GLA context, which also
monitors the IBM DB2 log file, converts the log
information into Common Base Event format and
uses a custom outputter to send the event to the
application node using Web services.
Application node module one Resource model that monitors the application’s
CBE log file using ITL. This resource model
analyzes the events and takes action in case it
finds a connection problem to the application’s
database. The action taken signals the application
to put data insertion on hold.
Application node module two A small application named ITSO-SHIM running on
WebSphere. ITSO_SHIM is Web service that can
receive events from the GLA and save them into a
log file.
Chapter 9. Problem Determination scenario two 311
򐂰 Generic Log Adapter Runtime and Rule Sets V3.0.0
򐂰 Log and Trace Analyzer V3.0.0
򐂰 Eclipse Tooling Package V3.0
Refer to Chapter 2, “IBM Autonomic Computing Toolkit overview” on page 25 for
information about how to obtain these tools and technologies.
The following sections provide detailed information about each of the modules
described in Table 9-1 on page 310.
9.2.1 Database node module one
This section provides details about the development and implementation of the
components of database node module one. Figure 9-3 outlines the components
that we discuss in this section.
Figure 9-3 Database node module one
We describe the development of this module in the following topics:
򐂰 Defining the resource model
򐂰 Creating the MOF file
򐂰 Creating the CIM classes
򐂰 Implementing the DB2CBELogFileAdapterILT ILT class
򐂰 Implementing the DB2ResourceMonitorILT ILT class
򐂰 Implementing the utility class
򐂰 Creating the installation package
CBE DB2
Log File
AME
Environment
(SARA)
AME
RM
Action
ILT
Restart
DB
DB2
Database Node
312 Problem Determination Using Self-Managing Autonomic Technology
Defining the resource model
In this section, we create the resource model for this example scenario module.
Refer to the 6.2, “Resource models” on page 199 for information about the
resource model definition.
In 8.2, “Resource model definition” on page 260, we provide the sequence of
steps required to define a resource model. We followed those same steps for
creating the resource models using the following information:
Project name ACPD_SC2_DM1_RM
Internal Name DB2ResourceManagement
Descriptive Name DB2 Resource Management
Description Monitors the DB2 CBE log messages. Analyzes
the CBE log messages and generates an event
to rectify the problem that was identified
at the CBE log messages.
Category Internal Name DB2ResourceModel
Category Descriptive Name DB2 Resource Management
Major Version 1
Minor Version 0
Cycle Time 60
Script Language Selection JavaScript
Select the platforms w32-ix86
DB2 Resource Model Name DB2ResourceManagement.jrm
Creating the MOF file
In this section, we create the MOF file for this example scenario module. Refer to
Refer to “Managed Object Format (MOF)” on page 209 and 7.2.6, “Structure of
the MOF file” on page 253 for details.
The MOF file created is named DB2ResourceManagement.mof and is presented
in Example 9-1 on page 313. The MOF file defines two main interface definitions:
򐂰 DB2CBELogFileMonitor
This interface definition will be used to monitor the DB2 CBE log file.
򐂰 DB2ResourceMonitor
This interface definition will be used to activate an event when there is match
in the DB2 CBE log message.

Get Problem Determination Using Self-Managing Autonomic Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.