DescribeInstanceMonitorData

Last Updated: Feb 26, 2018

Description

Queries all the ECS-related monitoring data. The responded data can be displayed on several pages.

You can only query the monitoring data of an ECS that is not in the Stopped status. The monitoring data includes the CPU usage of the ECS, data traffic received by the ECS, data traffic sent by the ECS, ECS network traffic, and ECS average bandwidth. When you call this interface, consider the following:

  • You can only query up to 400 entries of monitoring data each time. If the specified (EndTime - StartTime)/ Period > 400, an error is returned.

  • You can only query the monitoring data that is 30 days later than the current time. If the specified StartTime is earlier than 30 days, an error is returned.

Request parameters

Name Type Required Description
Action String Yes The name of this interface. Value: DescribeInstanceMonitorData.
InstanceId String Yes ID of the target instance.
StartTime String Yes The start time of the monitoring data, which is represented according to ISO8601, and UTC is required. Valid format: YYYY-MM-DDThh:mm:ssZ.
If the seconds place is not 00, it is auto set to start of the next minute.
EndTime String Yes The end time of the retrieved data, which is represented according to ISO8601, and UTC is required. Valid format: YYYY-MM-DDThh:mm:ssZ.
If the seconds place is not 00, it is auto set to start of the next minute.
Period Integer No The interval of the retrieved monitoring data, unit: second. Optional values:
  • 60
  • 600
  • 3600
Default value: 60.

Response parameters

Name Type Description
MonitorData InstanceMonitorDataType A collection composed of instance monitoring data InstanceMonitorDataType.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=DescribeInstanceMonitorData
  2. &InstanceId=i-instnace1
  3. &StartTime=2014-10-29T23:00:00Z
  4. &EndTime=2014-10-30T08:00:00Z
  5. &<Common Request Parameters>

Response example

XML format

  1. <DescribeInstanceMonitorDataResponse>
  2. <RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId>
  3. <MonitorData>
  4. <InstanceMonitorData>
  5. <InstanceId>Bc0102-23xYm09</InstanceId>
  6. <CPU>2</CPU>
  7. <IntranetRX>122</IntranetRX>
  8. <IntranetTX>343</IntranetTX>
  9. <IntranetFlow>675</IntranetFlow>
  10. <IntranetBandwidth>10</IntranetBandwidth>
  11. <InternetRX>122</InternetRX>
  12. <InternetTX>343</InternetTX>
  13. <InternetFlow>675</InternetFlow>
  14. <InternetBandwidth>10</InternetBandwidth>
  15. <IOPSRead>1000</IOPSRead>
  16. <IOPSWrite>200</IOPSWrite>
  17. <BPSRead>1000</BPSRead>
  18. <BPSWrite>200</BPSWrite>
  19. <TimeStamp>2010-01-21T09:50:23Z</TimeStamp>
  20. </InstanceMonitorData>
  21. </MonitorData>
  22. </DescribeInstanceMonitorDataResponse>

JSON format

  1. {
  2. "RequestId": "C8B26B44-0189-443E-9816-D951F59623A9",
  3. "MonitorData": {
  4. "InstanceMonitorData": [{
  5. "InstanceId": "Bc0102-23xYm09",
  6. "CPU": 0,
  7. "IntranetRX": 122,
  8. "IntranetTX": 343,
  9. "IntranetFlow": 675,
  10. "IntranetBandwidth": 10,
  11. "InternetRX": 122,
  12. "InternetTX": 343,
  13. "InternetFlow": 675,
  14. "InternetBandwidth": 10,
  15. "IOPSRead": 1000,
  16. "IOPSWrite": 200,
  17. "BPSRead": 1000,
  18. "BPSWrite": 200,
  19. "TimeStamp": "2010-01-21T09:50:23Z"
  20. }]
  21. }
  22. }

Error codes

Error code Error message HTTP status code Meaning
InvalidEndTime.Malformed The specified parameter EndTime is not valid. 400 The specified EndTime is invalid.
InvalidParameter.TooManyDataQueried Too many data queried. 400 You can only query up to 400 entries of monitoring data each time.
InvalidPeriod.ValueNotSupported The specified parameter Period is not valid. 400 The specified Period is invalid.
InvalidStartTime.Malformed The specified parameter StartTime is not valid. 400 The format of the specified StartTime format is incorrect.
InvalidStartTime.TooEarly The specified parameter StartTime is earlier than 30 days. 400 The indicated StartTime must be 30 days later than the current time.
Throttling You have made too many requests within a short time; your request is denied due to request throttling. 400 Your request is denied due to request throttling. Please try again later.
InvalidInstanceId.NotFound The InstanceId provided does not exist in our records. 404 The specified InstanceId does not exist.
Thank you! We've received your feedback.