Consulte les données de surveillance d'une instance Elastic Compute Service (ECS). Les données de surveillance peuvent inclure l'utilisation des vCPU, les crédits CPU de l'instance extensible, la quantité de trafic de données reçues, la quantité de trafic de données envoyées et la bande passante moyenne.
Description de l'opération
Notes d'utilisation
Prenez note des éléments suivants :
-
Jusqu'à 400 entrées de données de surveillance peuvent être renvoyées à la fois. Assurez-vous que la valeur
TotalCountne dépasse pas 400. La valeur est calculée à l'aide de la formule suivante :TotalCount = (EndTime - StartTime)/Period. Si la valeur TotalCount est supérieure à 400, l'erreurInvalidParameter.TooManyDataQueriedest renvoyée. -
Vous pouvez interroger les données de surveillance des 30 derniers jours. Si la valeur de
StartTimeest antérieure de plus de 30 jours à l'heure actuelle, une erreur est renvoyée. -
Dans certains scénarios, par exemple lorsque l'instance est à l'état Stopped, le système ne peut pas obtenir les informations pertinentes et des informations spécifiques peuvent manquer dans les données de surveillance renvoyées.
-
Vous ne pouvez pas appeler cette opération pour obtenir les informations de surveillance de base du processeur d'une instance bare metal ECS. Pour obtenir les informations de surveillance du processeur d'une instance bare metal ECS, installez l'agent CloudMonitor sur l'instance. Pour plus d'informations, consultez InstallCloudMonitor.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
ecs:DescribeInstanceMonitorData |
get |
*Instance
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| InstanceId |
string |
Oui |
L'identifiant de l'instance. |
i-bp1a36962lrhj4ab**** |
| StartTime |
string |
Oui |
Le début de la plage de temps à interroger. Spécifiez l'heure selon la norme ISO 8601 au format yyyy-MM-ddTHH:mm:ssZ. L'heure doit être en UTC. Si la valeur des secondes ( |
2014-10-29T23:00:00Z |
| EndTime |
string |
Oui |
La fin de la plage de temps à interroger. Spécifiez l'heure selon la norme ISO 8601 au format yyyy-MM-ddTHH:mm:ssZ. L'heure doit être en UTC. Si la valeur des secondes ( |
2014-10-30T08:00:00Z |
| Period |
integer |
Non |
L'intervalle auquel récupérer les données de surveillance. Unité : secondes. Valeurs valides :
Valeur par défaut : 60. |
60 |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| RequestId |
string |
L'identifiant de la requête. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| MonitorData |
object |
||
| InstanceMonitorData |
array<object> |
Les données de surveillance de l'instance. |
|
|
object |
|||
| CPUCreditBalance |
number |
The total number of CPU credits for the burstable instance. |
120 |
| BPSRead |
integer |
The read bandwidth of the instance disks (including the system disk and data disks). Unit: bytes/s. |
1000 |
| InternetTX |
integer |
The public network data traffic sent by the instance during the specified interval ( |
343 |
| CPU |
integer |
The vCPU utilization of the instance. Unit: percent (%). |
2 |
| CPUCreditUsage |
number |
The number of CPU credits consumed by the burstable instance. |
30 |
| IOPSWrite |
integer |
The I/O write operations on the instance disks (including the system disk and data disks). Unit: operations/s. |
200 |
| IntranetTX |
integer |
The internal network data traffic sent by the instance during the specified interval ( |
343 |
| InstanceId |
string |
The instance ID. |
i-bp1a36962lrhj4**** |
| BPSWrite |
integer |
The write bandwidth of the instance disks (including the system disk and data disks). Unit: bytes/s. |
13585 |
| CPUNotpaidSurplusCreditUsage |
number |
The unpaid overdrawn CPU credits. |
0.5 |
| CPUAdvanceCreditBalance |
number |
The overdrawn CPU credits (the portion of burstable instance credits that exceeds the limit). |
0.4 |
| IOPSRead |
integer |
The I/O read operations on the instance disks (including the system disk and data disks). Unit: operations/s. |
1000 |
| InternetBandwidth |
integer |
The public bandwidth of the instance, which is the network traffic per unit of time. Unit: kbits/s. |
10 |
| InternetRX |
integer |
The public network data traffic received by the instance during the specified interval ( |
122 |
| TimeStamp |
string |
The timestamp of the monitoring data. |
2014-10-30T05:00:00Z |
| IntranetRX |
integer |
The internal network data traffic received by the instance during the specified interval ( |
122 |
| IntranetBandwidth |
integer |
The internal bandwidth of the instance, which is the network traffic per unit of time. Unit: kbits/s. |
10 |
Exemples
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"MonitorData": {
"InstanceMonitorData": [
{
"CPUCreditBalance": 120,
"BPSRead": 1000,
"InternetTX": 343,
"CPU": 2,
"CPUCreditUsage": 30,
"IOPSWrite": 200,
"IntranetTX": 343,
"InstanceId": "i-bp1a36962lrhj4****",
"BPSWrite": 13585,
"CPUNotpaidSurplusCreditUsage": 0.5,
"CPUAdvanceCreditBalance": 0.4,
"IOPSRead": 1000,
"InternetBandwidth": 10,
"InternetRX": 122,
"TimeStamp": "2014-10-30T05:00:00Z",
"IntranetRX": 122,
"IntranetBandwidth": 10
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | InvalidStartTime.Malformed | The specified parameter "StartTime" is not valid. | The specified StartTime parameter does not conform to the specification. |
| 400 | InvalidEndTime.Malformed | The specified parameter "EndTime" is not valid. | The specified EndTime parameter is invalid. |
| 400 | InvalidPeriod.ValueNotSupported | The specified parameter "Period" is not valid. | |
| 400 | InvalidStartTime.TooEarly | The specified parameter "StartTime" is too early. | |
| 400 | InvalidParameter.TooManyDataQueried | Too many data queried. | The monitoring data node is out of range. |
| 400 | Throttling | Request was denied due to request throttling. | The request is throttled. Use the NextToken-based pagination method instead of the PageNumber-based pagination method. |
| 400 | InvalidStartTime.ValueNotSupported | The specified parameter StartTime is later than EndTime. | The specified start time cannot be earlier than the current time. |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified instanceId is invalid. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.