Configuring the Harvester for Metric Collection 7-5
7.3.5 When Configuration Settings Are Validated
WLDF attempts to validate configuration as soon as possible. Most configuration is validated at system startup and whenever a dynamic change is committed. However,
due to limitations in JMX, custom MBeans cannot be validated until instances of those MBeans have been registered in the MBean server.
7.3.6 Sample Configurations for Different Harvestable Types
In Example 7–2
, the harvested-type element in the DIAG_MODULE.xml configuration file specifies that the ServerRuntimeMBean is to be harvested. Because
no harvested-instance sub-element is present, all instances of the type will be collected. However, because there is always only one instance of the server runtime
MBean, there is no need to provide a specific list of instances. And because there are no harvested-attribute sub-elements present, all available attributes of the MBean
are harvested for each of the two instances.
Example 7–2 Sample Configuration for Collecting All Instances and All Attributes of a
Type in DIAG_MODULE.xml
harvested-type nameweblogic.management.runtime.ServerRuntimeMBeanname
harvested-type
In Example 7–3
, the harvested-type element in the DIAG_MODULE.xml configuration file specifies that the WLDFHarvesterRuntimeMBean is to be harvested.
As above, because there is only one WLDFHarvesterRuntimeMBean, there is no need to provide a specific list of instances. The sub-element harvested-attribute specifies
that only two of the available attributes of the WLDFHarvesterRuntimeMBean will be harvested: TotalSamplingTime and CurrentSnapshotElapsedTime.
Example 7–3 Sample Configuration for Collecting Specified Attributes of All Instances
of a Type in DIAG_MODULE.xml
harvested-type nameweblogic.management.runtime.WLDFHarvesterRuntimeMBeanname
harvested-attributeTotalSamplingTimeharvested-attribute harvested-attributeCurrentSnapshotElapsedTime
harvested-attribute harvested-type
In Example 7–4
, the harvested-type element in the DIAG_MODULE.xml configuration file specifies that a single instance of a custom MBean type is to be
harvested. Because this is a custom MBean, the type name is the implementation class. In this example, the two harvested-instance elements specify that only two
instances of this type will be harvested. Each instance is specified using the canonical representation of its JMX ObjectName. Because no instances of harvested-attribute
are specified, all attributes will be harvested.
Note: Harvesting from the DomainRuntime MBean server is
available only on the Administration Server. Attempts to harvest DomainRuntime MBeans on a Managed Server are ignored. For an
example, see Example 7–5
.
7-6 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server
Example 7–4 Sample Configuration for Collecting All Attributes of a Specified Instance
of a Type in DIAG_MODULE.xml
harvested-type namemyMBeans.MySimpleStandardname
harvested-instancemyCustomDomain:Name=myCustomMBean1 harvested-instance
harvested-instancemyCustomDomain:Name=myCustomMBean2 harvested-instance
harvested-type
In Example 7–5
, the harvested-type element in the DIAG_MODULE.xml configuration file specifies that the ServerLifeCycleRuntimeMBean is to be harvested.
The namespace attribute specifies that this is a DomainRuntime MBean, so this configuration will only be honored on the administration server see the note in
Section 7.3.4, Harvesting from the DomainRuntime MBeanServer . The sub-element
harvested-attribute specifies that only the StateVal attribute will be harvested.
Example 7–5 Sample configuration for Collecting Specified Attributes of the
ServerLifeCycleMBean Type in DIAG_MODULE.xml
harvested-type nameweblogic.management.runtime.ServerLifeCycleRuntimeMBeanname
namespaceDomainRuntimenamespace known-typetrueknown-type
harvested-attributeStateValharvested-attribute harvested-type
8
Configuring Watches and Notifications 8-1