You can view Elastic Compute Service (ECS) system events that were handled within the last week to obtain data for troubleshooting and analysis purposes.
View historical system events in the ECS console
Log on to the ECS console.
In the left-side navigation pane, click Events.
On the Events page, you can view system events of different types in different regions to obtain information such as instance IDs, event types, and event states.
The following figure shows the instance billing events in a specified state in a specific region.
Query historical system events by using Alibaba Cloud CLI
Obtain the ID of the instance for which you want to query historical system events.
aliyun ecs DescribeInstances --RegionId <TheRegionId> --output cols=InstanceId,InstanceName rows=Instances.Instance[]
Call the
DescribeInstanceHistoryEvents
operation to query the historical system events of the instance.aliyun ecs DescribeInstanceHistoryEvents --RegionId <TheRegionId> --InstanceId i-bp13kpqetxnp2a****** --output cols=EventId,EventTypeName rows=InstanceSystemEventSet.InstanceSystemEventType[]