Using the WebLogic
Diagnostic Framework
Console Extension
Working with Metrics Charts and Graphs
Metrics charts and graphs plot the values of MBean instances and attributes. The values can be real-time polled metric values obtained from a running WebLogic Server, or they can provide a historical view of that metric value for all metrics maintained by the WLDF Harvester.
To create charts and graphs based on metrics data, you drag metrics attributes from the Metrics tab to the View panel. Each new graph shows the value of the selected attribute over time.
The following sections describe how to work with metrics charts and graphs:
For general information about working with metrics charts and graphs and with method performance charts and graphs, see Working with All Charts and Graphs.
Selecting a Server
The Metrics tab displays metrics available for a single server at a time. To select a different server, select the server from the Server dropdown list. The Server dropdown list displays all the servers in the domain.
Understanding the Contents of the MBean Tree in the Metrics Tab
The Metrics tab displays a tree containing the following:
WebLogic MBean types
Currently registered instances of the WebLogic MBean types
Currently registered instances of custom MBean types
Attributes of the listed registered instances
The icons described in Table 7-1 help to identify items in the tree:.
Table 7-1 Visual Cues in the MBean Tree in the Metrics tab
Icon
Represents...
WebLogic MBean type
JMX MBean type
Custom MBean type
MBean instance
Attribute of an MBean instance
Displaying Items in the Metrics tab
The tree shows the MBean types, instances, and attributes for a server. Display items in the Metrics tab, as follows:
To view the MBeans from a different server in the domain, select the server from the Select server dropdown list. (You can display MBeans from only one server instance at a time, but you can create a chart using data from more than one server.)
To refresh the tree for the selected server, click the Reload button.
To show all currently registered instances of a listed MBean type, click the (Expand) button to the left of the type name.
Note:
If the MBean type has no registered instances, the name of the MBean type appears in a gray, italic font. If no instances are registered, you cannot expand the node.
To show all attributes of a listed MBean instance, click the (Expand) button to the left of the left of the MBean name.
Displaying Details About MBean Instances and Attributes in the Metrics Tab
You can display details about MBean instances and attributes by placing the mouse pointer over items in the tree of MBeans displayed in the Metrics tab:
Point to an MBean instance name to display the full object name of the MBean instance.
Point to an MBean attribute name to display the type and description of the attribute.
Displaying Details About Metrics Charts and Graphs
You can display details about metrics charts and graphs displayed in the View panel by pointing the mouse pointer at objects in the panel:
Point to a data point in a graph to display the time the data point was plotted and the sampled metric value at that time.
Point to a chart legend to display the object instance name for each attribute listed in the legend.
Point to a chart scrollbar to display the beginning data and time and the ending date and time for the visible interval. This tooltip also tells if this interval is the current interval.
You can track a metric based on an attribute of any registered MBean simply by dragging the attribute to a chart. You can also create more complex custom metrics by performing a variety of functions on one or more MBean instance attribute values. The custom metric is then available for creating graphs for all instances of a type.
To create a custom metric:
In the Metrics tab, right-click the name of the MBean type for which you want to create a custom metric.
From the context menu, select Create Custom Metric. The Custom Metric Editor is displayed in the right panel, replacing any view displayed in the View panel.
Note:
The Custom Metric Editor provides comprehensive help through tooltips. To display a tooltip, point the mouse at a field, function, or item in an expression, then pause for a moment until the tooltip is displayed.
Define a custom metric by constructing an expression in the Expression field of the Custom Metric Editor, as follows:
To insert a function, drag the function from the Available Functions box and drop it into the appropriate position in the Expression field. The available functions are explained in Table 7-2, Table 7-3, and Table 7-4. The positions where you can drop an item are described later in this step
To insert a simple metric based on an MBean attribute, drag the attribute (metric) from the Metrics tab and drop it into the appropriate position in the Expression field. (You can also drag a previously defined custom metric into the Expression field to create a nested custom metric.)
To edit a scalar value in an expression, right click the value in the Expression field, select Edit from the context menu, then enter a new value.
To delete an item from the expression in the Expression field, right-click the item, then select Delete from the context menu.
The Custom Metric Editor enforces where you can drop a function or attribute. When you drag an item to an allowed position in the Expression field, the position is highlighted to indicate you can drop an item there. You can drop into the following positions:
Drag a metric or a function directly onto another metric or function to replace it.
Note:
If no metric or function has yet been inserted where one is required, The placeholder <MP> (that is, a metric placeholder) appears wherever a metric or function is required but none has yet been added. You can drag a function or metric onto any occurrence of <MP>.
Drag a function onto an insert area to insert it into that position, without replacing any existing items. Any terms to the right of the inserted function are included as the first argument to the function.
Note:
To display symbols that indicate where the insert areas are, check the Show Insert Areas checkbox under the Expression field.
Click Save to save the metric or Cancel to close the Custom Metric Editor without saving the metric.
Note:
When you display the Custom Metric Editor for an MBean type, you can use the editor to build an expression for that MBean type only. If you want to create a custom metric for a different MBean type, you must save or cancel the expression you are building, then right-click the different MBean type to create a custom metric for it.
Editing and Deleting Custom Metrics
To edit or delete a custom metric:
In the Metrics tab, find the MBean type for which you defined the custom metric.
Click the icon next to the name of the MBean type to display its instances, if they are not already displayed.
Click the icon of any MBean instance to display its metrics, if none are already displayed. A custom metric defined for an MBean type is displayed for every MBean instance derived from the type.
Right click the name of the custom metric.
Select Edit Custom Metric to edit it or Delete Custom Metric to delete it. When you edit a custom metric, it is changed for every MBean instance of the type. When you delete a custom metric from the list of metrics for an MBean instance, it is deleted from all the instances of the type.
Changing the Name of a Custom Metric
To create a copy of a custom metric:
In the Metrics tab, find the MBean type for which you defined the custom metric whose name you want to change.
Right-click the name of the custom metric.
Select Edit Custom Metric.
In the Metric Name field, change the metric's name.
Click Save.
Creating a Copy of a Custom Metric
To create a copy of a custom metric:
In the Metrics tab, find the MBean type for which you defined the custom metric you want to copy.
Right-click the name of the custom metric.
Select Edit Custom Metric.
In the Metric Name field, change the metric's name.
Click Save As.
Functions for Creating Custom Metrics
The Available Functions box in the Custom Metric Editor lists all the functions you can use to construct an expression. To display a note about what each function does, point the mouse to the function and pause. A tooltip is displayed. The functions are listed by type and explained in the following tables:
In the tables, <MP> represents a function or a defined metric.
Table 7-2 describes functions that accept vector and/or scalar data but do not require a computed state from previous data for comparing results.
Table 7-2 Functions Accepting Vector and/or Scalar Data but Not Requiring State from Previous Data
Function
Description
Abs(<MP>)
Absolute value of the argument
Change(<MP>)
Difference between the current value and the last observed value of the argument
Difference(<MP>,<MP>)
Difference of the observed values of the arguments, for example, A1-A2.
Difference(<MP>,NumericValue)
Value determined by subtracting the provided scalar value from the current value
Inverse(<MP>)
Inverse of the observed value of the argument, for example (1/value)
Negative(<MP>)
Negative of the observed value of the argument, that is, 0-value
Over(<MP>,Threshold)
Boolean value (0 or 1) indicating when the value of the first argument falls below the provided constant threshold
Product(<MP>,<MP>)
Multiple of the observed values of the arguments, for example, A1*A2
Product(<MP,NumericValue>)
Value determined by multiplying the current value by the provided scalar value
Ratio(<MP>,NumericValue)
Ratio of the observed values of the arguments, for example, A1/A2
Ratio(<MP,<MP>>)
Value determined by multiplying the current value by the provided scalar value
Sum(<MP>,<MP>)
Sum of the observed values of the arguments, for example, A1+A2
Sum(<MP>,NumericValue)
Value determined by adding the provider scalar to the current value
Under(<MP>,Threshold)
Boolean value (0 or 1) indicating when the value of the first argument falls below the provided constant threshold
Table 7-3 describes functions that accept vector and/or scalar data and that do require a computed state from previous data for computing results.
Table 7-3 Functions Accepting Vector and/or Scalar Data and Requiring State from Previous Data
Function
Description
Count(<MP>)
Number of observed values of the argument
Max(<MP>)
Maximum observed value of the argument
Mean(<MP>)
Mean of the observed values of the argument
Min(<MP>)
Minimum observed value of the argument
StandardDeviation(<MP>)
Standard deviation of the observed values of the argument
Summation(<MP>)
Sum of all the observed values of the argument
Table 7-4 describes functions that operate over an interval.
Table 7-4 Functions that Operate Over an Interval
Function
Description
Change(<MP>,Interval)
Difference between the current value and the first value at a time greater than or equal to the timeT-I where I is the millisecond interval value provided
HighModel(<MP>,Interval)
Median of the observed values of the argument over the interval defined by the provided value
LowModel(<MP>,Interval)
Median of the observed values of the argument over the interval defined by the provided value
Median(<MP>,Interval)
Median of the observed values of the argument over the interval defined by the provided value