You can obtain a list of metrics for virtual machines.
Execution permission
Admin, Modify
Request line
GET baseURL/v1/objects/PerformanceVirtualMachine?$query={HQL}&basePointNodeID={nodeID}&basePointNodeType={E2ENodeType}&pointTimeRange={range}&page={page}&pageSize={size}&baseTime={dateTime}&conflict={conflict}
Query parameters
The following table describes the values for the supported parameters of a query string:
|
Parameter |
Description |
|---|---|
|
$query={HQL} |
(Required) Using HQL. Specify the following parameters. MetricType ((Required) Only one value can be specified.) parentNodeID ((Optional) Multiple values can be specified.) Filtering conditions: Specify using HQL standard. |
|
basePointNodeID={nodeID} |
(Required) Specify 1 or more base IDs. Filtering conditions: Checks whether the value is included in the comparison target. Multiple values separated by a comma (,) can be specified. |
|
basePointNodeType={E2ENodeType} |
(Required) Specify the E2E node type. Filtering conditions: Checks whether the comparison target is equal to the value |
|
pointTimeRange={range} |
(Required) Specify the time period to be displayed. Filtering conditions: Checks whether the comparison target is equal to the value |
|
page={page} |
(Optional) Specify the paging information (page to be obtained). Filtering conditions: Checks whether the comparison target is equal to the value |
|
pageSize={size} |
(Optional) Specify the number of items that can be displayed on 1 page. Filtering conditions: Checks whether the comparison target is equal to the value |
|
baseTime={dateTime} |
(Optional) Specify the display start time. Filtering conditions: Checks whether the comparison target is equal to the value |
|
conflict={conflict} |
(Optional) Specify the method used for calculating the aggregation value ("null" or "peak" or "average"). Filtering conditions: Checks whether the comparison target is equal to the value |
Request body
Not applicable.
Response body
The structure of the response body and the object attributes is as follows:Collections
{
"data":["...", ...],
"pagination":{
"page":"...",
"pageSize":"...",
"numPages":"...",
"totalCount":"..."
},
"count":"..."
}
Collections (Type: Collections)
|
Attribute |
Type |
Description |
|---|---|---|
|
data |
anyType[] |
A list of PerformanceVirtualMachine objects. For details, see the table below. |
|
pagination |
Pagination |
Page information. This parameter is displayed only when the relevant resource exists. |
|
count |
int |
Number of data items that meet the conditions related to this query(API). |
pagination (Type: Pagination)
|
Attribute |
Type |
Description |
|---|---|---|
|
page |
integer |
Page. |
|
pageSize |
integer |
Size of page. |
|
numPages |
integer |
Number of pages. |
|
totalCount |
integer |
Number of objects. |
PerformanceVirtualMachine
{
"instanceID":"...",
"componentID":"...",
"componentName":"...",
"metricType":"...",
"status":"...",
"parentNodeID":"...",
"parentNodeName":"...",
"hypervisorName":"...",
"clusterName":"...",
"thresholdProfileName":"...",
"performancePeakLatest":"...",
"performancePeakWorst":"...",
"performanceAverageLatest":"...",
"performanceAverageWorst":"..."
}
PerformanceVirtualMachine (Type: PerformanceVirtualMachine)
|
Attribute |
Type |
Description |
|---|---|---|
|
instanceID |
string |
ID of the performance information of the virtual machine |
|
componentID |
string |
ID of a component that has performance information |
|
componentName |
string |
Name of a component that has performance information |
|
metricType |
enum |
ID of the metric (For details about the valid values, see the table MetricType in List of enumerators.) |
|
status |
enum |
Status of the performance information (For details about the valid values, see the table ElementStatusType in List of enumerators.)
|
|
parentNodeID |
string |
ID of the virtual machine |
|
parentNodeName |
string |
Name of the virtual machine |
|
hypervisorName |
string |
Name of the hypervisor |
|
clusterName |
string |
Name of the cluster |
|
thresholdProfileName |
string |
Name of the threshold profile |
|
performancePeakLatest |
float |
Latest peak performance value within the specified period |
|
performancePeakWorst |
float |
Peak performance value that is closest to the abnormality line within the specified period |
|
performanceAverageLatest |
float |
Latest average performance value within the specified period |
|
performanceAverageWorst |
float |
Average performance value that is closest to the abnormality line within the specified period |
Status codes
|
Status code |
Reason phrase |
Description |
|---|---|---|
|
200 |
OK |
Success. |
|
400 |
Bad Request |
A query parameter is invalid. |
|
401 |
Unauthorized |
No login privilege. |
|
412 |
Precondition Failed |
The server is not available. |
|
500 |
Internal Server Error |
Server processing error. |
|
503 |
Service Unavailable |
Analyzer detail view server communication error. |
Example code
[Request Header]
GET /Analytics/v1/objects/PerformanceVirtualMachine/?%24query=metricType%20eq%20%27ESX_VM_VM_CPUREADY%27&basePointNodeID=vm%23ABC_172.17.17.115_vm-142&basePointNodeType=STORAGE_VOLUME&pointTimeRange=86400000
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
Host: localhost:22015
Accept: application/json
Content-Type: application/json
[Response Header]
HTTP/1.1 200 OK
Date: Wed, 20 Jul 2016 02:52:15 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO 33659a74fcee4358dc272b34eca6ded1bf1131ec_YXZvNFIMehp3UB4jbmVyPGUgT3Q=_V0810
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Content-Type: application/json
[Response Body]
{
"data" : [ {
"instanceID" : "vm#ABC_172.17.17.115_vm-142#ESX_VM_VM_CPUREADY",
"componentID" : "vm#ABC_172.17.17.115_vm-142",
"componentName" : "CPU",
"metricType" : "ESX_VM_VM_CPUREADY",
"status" : "Unknown",
"parentNodeID" : "vm#ABC_172.17.17.115_vm-142",
"parentNodeName" : "perf_vm",
"hypervisorName" : "172.17.17.181",
"thresholdProfileName" : "Default Profile for VM (VMware)",
"performancePeakLatest" : 0.0,
"performancePeakWorst" : 0.0,
"performanceAverageLatest" : 0.0,
"performanceAverageWorst" : 0.0
} ],
"count" : 1
}