Smart Plug-in for WebLogic Server User's Guide

5-2
Chapter 5: WebLogic Server SPI User Defined Metrics
Introduction to User Defined Metrics
Introduction to User Defined Metrics
The WebLogic Server SPI can collect data on roughly 55 metrics. However, you
can, if you choose, add your own metrics. In defining your own metrics, you can
monitor your own applications by registering application MBeans with the
WebLogic MBean server and creating user-defined metrics (UDMs) that instruct
the SPI to gather data from these MBeans.
NOTE A custom MBean must expose a “Name” attribute. The WebLogic SPI uses this
name as the identifying name for the MBean. If your custom MBean is a
multi-instance MBean, then each MBean instance must have a unique value in
its Name attribute. For example, WebLogic's ServletRuntime MBeans are
multi-instance because a ServletRuntime MBean is instantiated by WebLogic
for each deployed servlet. The Name attribute of the MBean identifies the
servlet that the MBean is monitoring.
Please see the JMX documentation for more information about creating
MBeans. Also refer to the WebLogic documentation for more information about
registering MBeans. The sections that follow assume you are familiar with
XML and DTDs.
Metric Definitions Structure
When you define metrics, you create an XML file and structure its content
according to the MetricsDefintions.dtd (Document Type Definition) file included
with the WSL-SPI. The
MetricsDefinitions.dtd file content is described
and a sample XML shown in the sections that follow.
THE WLS-SPI METRICS DEFINITIONS FILE (DTD FILE)
The WLS-SPI includes a document type definition (DTD) file that shows how
the elements of your WLS-SPI XML metric definitions should appear. This file,
MetricDefinitions.dtd, provides the structure and syntax for the XML file
that you create. The WLS-SPI uses this file to parse and validate the XML file
you create.