Skip to main content

GET /metrics_service/metrics/servers

Use this method to return metrics data for all managed servers.

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

Query parameters

ParameterRequired / OptionalDescription
interval={integer}OptionalReturns 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.
  • cpuTemp. 60 second intervals

  • averageCPUUtilization. 30 second intervals

  • averageMemoryUtilization. 30 second intervals

  • inletAirTemp. 60 second intervals

  • averageConsumedWatts. 30 second intervals

  • maxConsumedWatts. 30 second intervals

  • minConsumedWatts. 30 second intervals

  • powerOutputWatts. 30 second intervals

  • powerInputWatts. 30 second intervals

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
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?metricsType=PowerMetrics
&startTimestamp=2020-07-01T012:00:00Z&period=120
The following example returns power-supply metrics that were collected between noon and 2pm, in 60 second intervals.
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

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.
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
resultsArray of objectsInformation about metrics data that was collected for each server
 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.
{
"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"
}]
}