Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Defining metric sets for the Metric Graph and Metric Sparklines widgets (2011714)

Solution

To define a fixed set of metrics for the Metric Graph or Metric Sparklines widget:

  1. Create a metric set definition XML file.

    Note: For file syntax, see the Sample Metric Set Definition XML File section.
  2. Save the metric set definition XML file in the /usr/lib/vmware-vcops/tomcat-enterprise/webapps/vcops-custom/WEB-INF/classes/resources/redkndmetrics directory.

    Note: You can save multiple files in this directory.

  3. Log in to vCenter Operations Enterprise.

    Note: Ensure that you have the necessary access rights to edit widget configurations.
  4. On the dashboard that contains the widget to edit, click the Edit Widget icon on the widget's toolbar.
  5. In the Edit Widget window, select the metric set definition XML file from the Res. Interaction Mode menu.

    All of the files in the reskndmetrics directory appear in the menu.

  6. Click OK to save the widget configuration.

For more information about editing a widget configuration, see the VMware vCenter Operations Enterprise User's Guide.

Sample Metric Set Definition XML File

Following is an example of a metric set definition XML file. When the widget uses this file, it draws the resourceMemOverhead_latest, capacity_provisioned, and host_contention metrics if the resource HostSystem is selected.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AdapterKinds>
<AdapterKind adapterKindId="5" adapterKindKey="VMWARE">

<ResourceKind resourceKindId="17" resourceKindKey="HostSystem">
<Metric attrkeyId="911" attrkey="sys:host/vim/vmvisor/slp|resourceMemOverhead_latest" />
<Metric attrkeyId="150" attrkey="cpu|capacity_provisioned" />
<Metric attrkeyId="159" attrkey="mem|host_contention" />
</ResourceKind>
</AdapterKind>
</AdapterKinds>

Retrieving Information from the vCenter Operations Enterprise Database

 
You can obtain keys and identifiers for the metric set definition XML file by accessing the vCenter Operations Enterprise database and running SQL queries.

To access the vCenter Operations Enterprise database and run SQL queries:
  1. In a Web browser, type http://ip_address/vcops-custom/dbAccessQuery.action where ip_address is the IP address of the host of the vCenter Operations Enterprise database.
  2. Type your SQL query in the top right window.

    For example:

    select a.ADAPTER_KIND_ID, a.ADAPTER_KEY, b.RESKND_ID, b.RESKND_KEY, e.ATTRKEY_ID, e.ATTR_KEY from AdapterKind a
    inner join ResourceKind b on (b.ADAPTER_KIND_ID = a.ADAPTER_KIND_ID)
    inner join AliveResource c on (c.RESKND_ID = b.RESKND_ID)
    inner join ResourceAttributeKey d on (d.RESOURCE_ID = c.RESOURCE_ID)
    inner join AttributeKey e on (e.ATTRKEY_ID = d.ATTRKEY_ID)
    where a.ADAPTER_KEY = 'something' or b.RESKND_KEY = 'something'

  3. Click Execute SQL.

    The results appear in the lower right window.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 1 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 1 Ratings
Actions
KB: