Smart Plug-in for WebLogic Server User's Guide

Chapter 5: WebLogic Server SPI User Defined Metrics
Introduction to User Defined Metrics
5-17
<MBean instanceType="single">
<FromVersion server="6.0" update="1"/>
<ObjectName>*:*,Type=JVMRuntime</ObjectName>
<Attribute>HeapFreeCurrent</Attribute>
</MBean>
</Metric>
<Metric id="JVM_HeapSizeCurrent" alarm="no">
<MBean>
<FromVersion server="6.0" update="1"/>
<ObjectName>*:*,Type=JVMRuntime</ObjectName>
<Attribute>HeapSizeCurrent</Attribute>
</MBean>
</Metric>
<!-- The following metric illustrates a calculated metric.
The calculation is based on the previous 2 "base"
metrics.
-->
<Metric id="WLSSPI_0705" name="B705_JVMMemUtilPct"
alarm="yes" graph="yes">
<Calculation>
<FromVersion server="6.0" update="1"/>
<Formula>((JVM_HeapSizeCurrent-JVM_HeapFreeCurrent)
/JVM_HeapSize Current)*100</Formula>
</Calculation>
</Metric>
<!-- The following metric illustrates a mapping from the
actual string value returned by the MBean attribute to
a numeric value so that an alarming threshold can be
specified in a monitor template. Note that the
'datatype'
must be specified as 'string'.
-->
<Metric id="WLSSPI_0701" alarm="yes" report="no">
<MBean dataType="string">
<ObjectName>*:*,Type=ServerRuntime</ObjectName>
<Attribute>State</Attribute>
<AttributeValueMapping>
<Map from="Running" to="1"/>
<Map from="Shutdown Pending" to="2"/>
<Map from="Shutdown In Progress" to="3"/>
<Map from="Suspended" to="4"/>
<Map from="Unknown" to="5"/>