Generate a List of All
Metrics for the Object
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.
Verify that the following
requirements are met:
- You are logged in to theVMware Aria Operationsinstance.
- You know theadapterKindvalue for the vCenter adapter and theresourceKindsvalue for the virtual machine. See Determine the Adapter Type and Object Types for the vCenter Adapter
- Make a GET request to obtain the metadata for metrics.GET https://operations.example.com/suite-api/api/adapterkinds/VMWARE/resourcekinds/VirtualMachine/statkeys
- 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
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
The old format,
continues to be supported inAuthorization: vRealizeOpsToken <vROps_token>
VMware Aria
Operations
.Where:
- VMWAREis theadapterKindKey.
- VirtualMachineis theresourceKindKey.
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. 
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
.