Skip to main content

GET /metrics_service/metrics/servers/{uuid}

Use this method to return metrics data for a specific server.

Note
  • 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/{uuid}

Query parameters

ParameterRequired / OptionalDescription
metricsType={type}OptionalReturns data only for the specified type. This can be one or more of the following values, separated by a comma.
  • cpuTemp. Average temperature for all processors, in Celsius

  • averageCPUUtilization. Average processor usage, as a percentage

  • averageMemoryUtilization. Average memory usage, as a percentage. The metric is captured every minute.

  • inletAirTemp. Temperature, in Celsius, of the inlet air. The temperature is captured every minute.

  • averageConsumedWatts. Average power consumption for the device, in Watts

  • maxConsumedWatts. Maximum power consumption for the device, in Watts

  • minConsumedWatts. Minimum power consumption for the device, in Watts

  • powerOutputWatts. Maximum power output for all power supplies, in Watts

  • powerInputWatts. Average power input for all power supplies, in Watts

If not specified, all metric types are returned.

period={integer}OptionalReturns 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}OptionalReturns 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.

The following example returns all metrics that were collected in the last hour.
GET https://192.0.2.0/metrics_service/metrics/servers/6ED2CB368C594C66C2BB066D5A306138
The following example returns power metrics that were collected in the last four hours.
GET https://192.0.2.0/metrics_service/metrics/servers?period=240
&metricsType=averageConsumedWatts,maxConsumedWatts,minConsumedWatts
The following example returns power metrics that were collected between noon and 2pm.
GET https://192.0.2.0/metrics_service/metrics/servers/6ED2CB368C594C66C2BB066D5A306138
?metricsType=PowerMetrics&startTimeStamp=2020-07-01T012:00:00Z&period=120

Request body

None

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA 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.
403ForbiddenThe 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.
404Not foundA specified resource cannot be found. A descriptive error message is returned in the response body.
409ConflictThere is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

ParametersTypeDescription
energyMetricsArray of objectsData for each metric

Each metric object includes the following attributes.

  • metricValue. Metric value, as an integer, that was collected at the specific timestamp

  • slot. Processor or power supply slot number

  • timestamp. Timestamp when the metric was collected

    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.

 averageCPUUtilizationArray of objectsAverage processor usage, as a percentage. The metric is captured every minute.
 cpuTempEventArray of objectsAverage temperature for all processors, in Celsius. The metric is captured every minute.
 averageMemoryUtilizationArray of objectsAverage memory usage, as a percentage. The metric is captured every minute.
 averageConsumedWattsArray of objectsAverage power consumption for the device, in Watts. These metrics are captured every 30 seconds.
 maxConsumedWattsArray of objectsMaximum power consumption for the device, in Watts. These metrics are captured every 30 seconds.
 minConsumedWattsArray of objectsMinimum power consumption for the device, in Watts. These metrics are captured every 30 seconds.
 PowerInputWattsArray of objectsAverage power input for all power supplies, in Watts. These metrics are captured every 30 seconds.
 PowerOutputWattsArray of objectsMaximum power output for all power supplies, in Watts. These metrics are captured every 30 seconds.
 inletAirTemperatureArray of objectsTemperature, in Celsius, of the inlet air. The temperature is captured every minute.
nameStringServer name
uriStringServer URI
uuidStringServer UUID
The following example is returned if the request is successful.
{
"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"
}