Database Reference
In-Depth Information
Agent's Metric Browser
It's often useful to use the agent's Metric Browser interface to view what the agent is actually collecting and even some
debugging information on the collected metrics. This is useful during troubleshooting, when it's not clear whether the
problem is with the metrics collection on the agent side or occurring during uploading and loading into the repository
on the OMS side. To activate the Metric Browser for the agent, run the following as the OS user running the agent:
emctl setproperty agent -name _enableMetricBrowser -value true
To determine the URL of the Metric Browser, run the command emctl status agent . The Agent URL line will
display in the format http://host:port/emd/main/ . Modify this URL by adding the /browser/ string between emd
and main , like this: http://host:port/emd/browser/main . Your agent might have https instead of http if it's secured,
so use the https URL in that case.
Using the Metric Browser is especially useful when using transient and computed columns, which are described
later. There is also a full Metric Definition XML fragment available with all attributes explicitly defined, even including
default values—a great way to learn about some nondocumented options. The Metric Browser lets you access
any target type, and not only your own targets, so you can see complete (and often complex) metric definitions
from Oracle's own targets that can give you excellent ideas on how to create your own metrics. Other debugging
information is available on metric collection but, unfortunately, it hasn't yet been documented in any detail and
I haven't had a need to use it so far.
Under the Hood of Metric Extensions
You probably noticed that defining target type metrics is similar to defining metric extensions, but in XML format.
In fact, Metric Extensions feature is basically the user interface for adding new metrics to existing targets without the
burden of creating completely new plug-ins and target types. Behind the scenes, metric extensions are the same XML
metric definitions that you see in target type metadata.
All metric extensions are stored in the table EM_MEXT_VERSIONS in the SYSMAN schema in the repository database.
The METADATA_DEFINITION column stores nothing else but the XML Metric element as the definition of the metric
extension. The relevant CollectionItem element is in the COLLECTION_DEFINITION column of that table.
Listing 10-14 contains the XML definition of the very first "Open Cursors, %" metric extension I created. It is
formatted here for readability.
Listing 10-14. XML Representation of a Metric Extension
<Metric NAME="ME$open_cursors_pct" TYPE="TABLE">
<Display>
<Label NLSID="NLS_METRIC_oracle_databaseME$open_cursors_pct">Open Cursors, %</Label>
<Description NLSID="NLS_DESCRIPTION_oracle_databaseME$open_cursors_pct">
Percentage of open cursors compare to open_cursors init.ora parameter.
Only top session value is returned.</Description>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="open_cursors_pct" TYPE="NUMBER">
<Display>
<Label NLSID="NLS_COLUMN_oracle_databaseME$open_cursors_pctopen_cursors_pct">
Open Cursors</Label>
<Unit NLSID="mext_unit_nlsid_ME$open_cursors_pct_open_cursors_pct">%</Unit>
</Display>
<CategoryValue CLASS="Default" CATEGORY_NAME="Capacity">
</CategoryValue>
 
Search WWH ::




Custom Search