You can obtain a list of metrics for specific resources.
Execution permission
Admin, Modify
Request line
GET baseURL/v1/objects/PerfComponents/{id}
Request body
Not applicable.
Response body
The structure of the response body and the object attributes is as follows:E2EPerfComponent
{
"instanceID":"...",
"componentID":"...",
"componentName":"...",
"metricType":"...",
"metricOrder":"...",
"metricName":"...",
"status":"..."
}
E2EPerfComponent (Type: E2EPerfComponent)
|
Attribute |
Type |
Description |
|---|---|---|
|
instanceID |
string |
ID of the performance information for a component |
|
componentID |
string |
ID of the component |
|
componentName |
string |
Name of the component |
|
metricType |
enum |
ID of the metric (For details about the valid values, see the table MetricType in List of enumerators.) |
|
metricOrder |
long |
Order of displaying metric types |
|
metricName |
string |
Name of the metric |
|
status |
enum |
Status of the performance information (For details about the valid values, see the table ElementStatusType in List of enumerators.)
|
Status codes
|
Status code |
Reason phrase |
Description |
|---|---|---|
|
200 |
OK |
Success. |
|
401 |
Unauthorized |
No login privilege. |
|
412 |
Precondition Failed |
The server is not available. |
|
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header]
GET /Analytics/v1/objects/PerfComponents/cpu%23ABC_172.17.17.115_host-435%5E0%23ESX_CPU_CPUUSAGE
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:12 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]
{
"instanceID" : "cpu#ABC_172.17.17.115_host-435^0#ESX_CPU_CPUUSAGE",
"componentName" : "",
"metricType" : "ESX_CPU_CPUUSAGE",
"metricOrder" : 3400,
"metricName" : "CPU Usage (VMware Host CPU)",
"status" : "Unknown"
}