To generate a complete list of metrics for any virtual machine defined in the vCenter adapter model, you make a GET request to the URL with the adapter type and the object type.

Prerequisites

Verify that the following requirements are met:

Procedure

  1. Make a GET request to obtain the metadata for metrics.
    GET https://operations.example.com/suite-api/api/adapterkinds/VMWARE/resourcekinds/VirtualMachine/statkeys
    
  2. Compare the metrics listed in the response to metrics displayed in the user interface. See Virtual Machine Metrics from the API and in the User Interface

Example: Virtual Machine Metrics from the API and in the User Interface

This example shows how the virtual machine metrics listed in the XML response compare to the metrics displayed in the VMware Aria Operations user interface.

Request:

GET https://operations.example.com/suite-api/api/adapterkinds/VMWARE/resourcekinds/VirtualMachine/statkeys
Content-Type: application/json
Authorization: OpsToken <vROps_token>
Accept: application/json
Note: The old format,
Authorization: vRealizeOpsToken <vROps_token>
continues to be supported in VMware Aria Operations.

Where:
  • VMWARE is the adapterKindKey.
  • VirtualMachine is the resourceKindKey.
  • vROps_token is the token that you obtained from the response in Acquire an Authentication Token.
Snippet of the response in JSON:
200 OK
{    
    "resourceTypeAttributes": [
        ...
        {        
            "key": "mem|host_workload",            
            "name": "Memory|Host Workload",            
            "description": "Host Workload (%)",            
            "defaultMonitored": false,            
            "rollupType": "AVG",            
            "instanceType": "INSTANCED",            
            "unit": "%",            
            "dataType2": "FLOAT",            
            "monitoring": false,            
            "property": false        
        },
        ...
    ]
}

Every resourceTypeAttribute in the response is a metric with metadata for a virtual machine object. The name corresponds to text displayed in the VMware Aria Operations user interface. In this example, the snippet lists metrics for Memory and Host Workload.

To compare metrics in the response with metrics in the user interface, log in to the VMware Aria Operations instance running on operations.example.com and navigate to the metrics for a virtual machine. The following example shows where you find metrics for Memory(Host) and Workload.

Metrics in UI

The example shows how to retrieve metrics for the virtual machine object type. To retrieve metrics for other object types, replace VirtualMachine in the GET request with other resourceKinds.