This topic describes how to use the Elastic Compute Service (ECS) console and Alibaba Cloud CLI to query and handle ECS system events.

Background information

You can view and handle ECS system events in the ECS console. You can also view systems events of ECS and other Alibaba Cloud services and configure notifications about system events in the CloudMonitor console. For more information, see View system events and Set event notifications.

View and handle system events on the Events page in the ECS console

You can view system events of all instances on the Events page in the ECS console.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. In the left-side navigation pane, click Events.
  5. View pending system events.
    If a number appears next to a category of system events, it indicates that some events of that category are pending. Different handling methods are recommended for different system events. For example, we recommend that you renew an instance in response to the event that the instance has expired, and we recommend that you repair a damaged local disk in response to the event that the local disk is damaged. You can manually execute the O&M task related to an event as instructed in the ECS console, or wait for the task to be automatically executed. eventpage

View and handle system events on the Instance Details page in the ECS console

You can view system events of an instance on the Instance Details page in the ECS console.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Find the instance whose system events that you want to view and click Manage in the Actions column.
  5. Click the Events tab.
  6. View pending system events.
    If a number appears next to a category of system events, it indicates that some events of that category are pending. Different handling methods are recommended for different system events. For example, we recommend that you renew an instance in response to the event that the instance has expired, and we recommend that you repair a damaged local disk in response to the event that the local disk is damaged. You can manually execute the O&M task related to an event as instructed in the ECS console, or wait for the task to be automatically executed. instance-detail

Query and handle system events by using Alibaba Cloud CLI

You can use Alibaba Cloud CLI to call API operations. For more information, see What is Alibaba Cloud CLI? This section describes a sample procedure to query and handle system events by calling API operations in Alibaba Cloud CLI.

  1. Call the DescribeInstances operation to obtain the ID of an instance.
    aliyun ecs DescribeInstances --RegionId <TheRegionId> --output cols=InstanceId,InstanceName rows=Instances.Instance[]
  2. Call the DescribeInstanceHistoryEvents operation to query the system events of the instance.
    • Query system events in the Scheduled state.
      aliyun ecs DescribeInstanceHistoryEvents --RegionId <TheRegionId> --InstanceId <YourInstanceId> --InstanceEventCycleStatus.1 Scheduled --output cols=EventId,EventTypeName rows=rows=InstanceSystemEventSet.InstanceSystemEventType[]
    • Query system events in the Scheduled, Inquiring, Executing, Executed, Avoided, Canceled, and Failed states.
      aliyun ecs DescribeInstanceHistoryEvents --RegionId <TheRegionId> --InstanceId <YourInstanceId> --InstanceEventCycleStatus.1 Scheduled --InstanceEventCycleStatus.2 Inquiring  --InstanceEventCycleStatus.3 Executing  --InstanceEventCycleStatus.4 Executed  --InstanceEventCycleStatus.5 Canceled  --InstanceEventCycleStatus.6 Avoided --InstanceEventCycleStatus.7 Failed --output cols=EventId,EventTypeName rows=rows=InstanceSystemEventSet.InstanceSystemEventType[]
    • Query system events in the Executed, Avoided, Canceled, and Failed states.
      aliyun ecs DescribeInstanceHistoryEvents --RegionId <TheRegionId> --InstanceId <YourInstanceId> --output cols=EventId,EventTypeName rows=rows=InstanceSystemEventSet.InstanceSystemEventType[]
    • Query system events in the Scheduled, Inquiring, and Executing states.
      aliyun ecs DescribeInstanceHistoryEvents --RegionId <TheRegionId> --InstanceId <YourInstanceId> --InstanceEventCycleStatus.1 Scheduled --InstanceEventCycleStatus.2 Inquiring --InstanceEventCycleStatus.3 Executing --output cols=EventId,EventTypeName rows=rows=InstanceSystemEventSet.InstanceSystemEventType[]
  3. Select appropriate methods to handle the events and optionally call corresponding API operations.
    Examples:
    • For a system event in the Inquiring state, call the AcceptInquiredSystemEvent operation to authorize Alibaba Cloud to execute the O&M task related to the event, or ignore the event.
    • For a system event that an instance is scheduled to be redeployed, call the RedeployInstance operation to redeploy the instance, or wait for the instance to be automatically redeployed.
    • For a system events that a subscription instance has expired, call the RenewInstance operation to renew the instance, or wait for the instance to be automatically stopped and released.

Allow ECS event notifications to be received

If you want to receive event notifications by internal message or by email, you must allow notifications to be received, such as resource expiration notifications, O&M notifications, and fault notifications, in the Message Center.

  1. Log on to the ECS console.
  2. In the right part of the top navigation bar, move the pointer over the 消息 icon and click Message Settings.
  3. In the Message Center, choose Message Settings > Common Settings to go the Common Settings page, find the notification types that you want, and then select one or more notification methods that suit your business requirements.
    Example notification types: Product operation notifications, Notifications of Product Expiration, and ECS Fault Notifications. notice-center-intl