GET /metrics_service/metrics/servers
Use this method to return metrics data for all managed servers.
Depending on your environment and the number of managed hardware resources, it might take several minutes to retrieve the requested metrics data.
This REST API requires Lenovo XClarity Administrator v3.3.0 or later.
Authentication
Authentication with username and password is required.
Request URL
GET https://{management_server_IP}/metrics_service/metrics/servers
Query parameters
Parameter | Required / Optional | Description |
---|---|---|
interval={integer} | Optional | Returns metrics in the specified intervals, in seconds The minimum interval is 30 seconds. If the specified interval is greater than the specified period, the startTimestamp changes to the end timestamp minus the interval. If not specified, the default interval is the sent by baseboard management controller for each measurement is used.
|
metricsType={type} | Optional | Returns data only for the specified type. This can be one or more of the following values, separated by a comma.
If not specified, all metric types are returned. |
period={integer} | Optional | Returns data that was collected in the specified amount of time, in minutes You can specify from 1 – 1440 minutes. If not specified, 60 minutes of data is returned by default. |
startTimestamp={timestamp} | Optional | Returns data that was collected starting at the specified time, using ISO-8601 format (for example, 2019-06-24T17:34:58+00:00) If not specified, data is returned for the most recent period. This date is specified using ISO-8601 format (for example, 2019-05-02). For information about ISO-8601 format, see the W3C Date and Time Formats webpage. |
GET https://192.0.2.0/metrics_service/metrics/servers
GET https://192.0.2.0/metrics_service/metrics/servers?period=240
&metricsType=averageConsumedWatts,maxConsumedWatts,minConsumedWatts
GET https://192.0.2.0/metrics_service/metrics/servers?metricsType=PowerMetrics
&startTimestamp=2020-07-01T012:00:00Z&period=120
GET https://192.0.2.0/metrics_service/metrics/servers?metricsType=PowerSupplyStats
&startTimestamp=2020-07-01T012:00:00Z&period=120&interval=60
Request body
None
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
403 | Forbidden | The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request. |
409 | Conflict | There is a conflict with the current state of the resource. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Parameters | Type | Description | ||
---|---|---|---|---|
results | Array of objects | Information about metrics data that was collected for each server | ||
energyMetrics | Array of objects | Data for each metric Each metric object includes the following attributes.
| ||
averageCPUUtilization | Array of objects | Average processor usage, as a percentage. The metric is captured every minute. | ||
cpuTempEvent | Array of objects | Average temperature for all processors, in Celsius. The metric is captured every minute. | ||
averageMemoryUtilization | Array of objects | Average memory usage, as a percentage. The metric is captured every minute. | ||
averageConsumedWatts | Array of objects | Average power consumption for the device, in Watts. These metrics are captured every 30 seconds. | ||
maxConsumedWatts | Array of objects | Maximum power consumption for the device, in Watts. These metrics are captured every 30 seconds. | ||
minConsumedWatts | Array of objects | Minimum power consumption for the device, in Watts. These metrics are captured every 30 seconds. | ||
PowerInputWatts | Array of objects | Average power input for all power supplies, in Watts. These metrics are captured every 30 seconds. | ||
PowerOutputWatts | Array of objects | Maximum power output for all power supplies, in Watts. These metrics are captured every 30 seconds. | ||
inletAirTemperature | Array of objects | Temperature, in Celsius, of the inlet air. The temperature is captured every minute. | ||
name | String | Server name | ||
uri | String | Server URI | ||
uuid | String | Server UUID |
{
"results": [{
"energyMetrics": {
"averageConsumedWatts": [{
"metricValue": 324,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"averageCPUUtilization": [{
"metricValue": 8,
"timeStamp": "2015-09-11T18:50:00Z"
}],
"averageMemoryUtilization": [{
"metricValue": 0,
"timeStamp": "2015-09-11T18:50:00Z"
}],
"cpuTemp": [{
"metricValue": 47,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"inletAirTemperature": [{
"metricValue": 28,
"timeStamp": "2015-09-11T18:50:00Z"
}],
"maxConsumedWatts": [{
"metricValue": 322,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"minConsumedWatts": [{
"metricValue": 320,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"powerInputWatts": [{
"metricValue": 325,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"powerOutputWatts": [{
"metricValue": 322,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}]
},
"name": "",
"uri": "node/F32D11A27A1C11EAB6B10A94EFAA959D",
"uuid": "F32D11A27A1C11EAB6B10A94EFAA959D"
},
{
"energyMetrics": {
"averageConsumedWatts": [{
"metricValue": 324,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"}
],
"averageCPUUtilization": [{
"metricValue": 8,
"timeStamp": "2015-09-11T18:50:00Z"
}],
"averageMemoryUtilization": [{
"metricValue": 0,
"timeStamp": "2015-09-11T18:50:00Z"
}],
"cpuTempEvent": [{
"metricValue": 47,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"inletAirTemperature": [{
"metricValue": 28,
"timeStamp": "2015-09-11T18:50:00Z"
}],
"maxConsumedWatts": [{
"metricValue": 322,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"minConsumedWatts": [{
"metricValue": 320,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"PowerInputWatts": [{
"metricValue": 325,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}],
"PowerOutputWatts": [{
"metricValue": 322,
"slot": "1",
"timeStamp": "2015-09-11T18:50:00Z"
}]
},
"name": "",
"uri": "node/85375E48DCD944D7948824935892CA4E",
"uuid": "85375E48DCD944D7948824935892CA4E"
}]
}