You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Monitoring
Querying and responding to "SystemMaintenance.Redeploy" events
Copy page
Download PDF
Querying and responding to "SystemMaintenance.Redeploy" events
This topic describes how to query and respond to "SystemMaintenance.Redeploy" events in the console and through the OpenAPI provided by the platform. This helps you quickly troubleshoot issues and run your cloud products stably.​
Scenarios​
When the host where the ECS instance you purchased resides functions abnormally, such as CPU overheating, power supply failure, or fan failure, but has not yet crashed, the platform generates a "SystemMaintenance.Redeploy" event and notifies you.​
After receiving a notification, you can perform as follows:​
warning​
  • During the O&M period, operations such as shutdown and restart are performed on the instance, which may impact your business. Please select an appropriate O&M time.​
  • Currently, only General-purpose, Compute-optimized, Memory-optimized, and High Frequency instance families support automatic O&M for "SystemMaintenance.Redeploy" events. If you have not completed O&M authorization or have completed O&M authorization with a scheduled execution time that has not yet arrived, automatic O&M (automatic cancellation) will also be triggered if the instance is resized, powered on, or restarted.​
  • Authorize O&M​
  • Select an O&M time window and manually authorize O&M personnel to deploy your instance to a new host. This prevents more serious downtime failures in the abnormally running host from damaging your business and data.​
You can also create a scheduled maintenance window to enable automatic authorization. When a "SystemMaintenance.Redeploy" event occurs, VolcanoEngine will be automatically authorized to deploy your instance to a new host. Learn more.​
  • Automatic O&M​
  • Automatic O&M operations can be triggered by actions, including instance resizing, power-on, or restart. This means that the instance will be automatically deployed to a healthy host to reduce risks and avoid damage to your business and data in time.​
In the example provided in this topic, O&M is authorized manually.​
Prerequisites​
Redeploying instances will affect data stored on local volumes. Please back up data in advance to prevent data loss. You can back up data using volumes, TOS, or other methods.​
Procedure​
Respond in the console​
This practice uses responding to events on the "Events" page as an example. You can also go to the instance details page to respond. For detailed instructions on the instance details page, see Querying and handling events.​
  1. Log in to the ECS console. ​
  1. In the left-side navigation pane, select "Maintenance & Monitoring > System Events".​
  1. In the top menu bar, select the project and region of the target instance.​
  1. Click the "Scheduled operations events" tab, and filter the target event by event ID or time.​
In the example provided in this topic, instances that trigger "SystemMaintenance.Redeploy" events are mainly involved. For more event types, see Event type summary.​
  1. In the "Actions" column of the target event, click the "Authorize maintenance" button to authorize.​
  1. Select the maintenance time for redeployment. You can choose whether the maintenance is executed immediately or at a scheduled time.​
  • Execute now: The instance will be redeployed immediately.​
  • Schedule: The instance will be redeployed at a scheduled time.​
tip​
If you select "Schedule", you can still change the maintenance time within the specified period after authorization.​
  1. Click the "Confirm" button to complete the authorization.​
  1. After successful authorization, the event status turns Executing.​
  • VolcanoEngine O&M personnel will redeploy the instance based on the maintenance time you specify. After the deployment is completed, the event status turns Succeeded.​
Respond through OpenAPI​
In this section, the Java language interface is used as an example. The following is for your reference to call OpenAPI interfaces in sequence to query and respond to ECS instance events.​
tip​
  • Relevant interfaces in this section are called through the platform SDK. Please import the platform SDK into your project. For details, see SDK overview.​
  • If you do not want SDK to be introduced, you can create HTTP/HTTPS requests manually. For details, see Calling methods. ​
  • Events of GPU instances in HPC clusters do not support OpenAPI-based responses.​
  1. Call the DescribeSystemEvents interface to query information about ECS instance-triggered events.​
  • Sample request:​
  • ​
    public void queryInstanceEvents(){​
    //Set your AK​
    String ak = "Your AK";​
    //Specify your SK​
    String sk = "Your SK";​
    //Specify the region to be accessed. In this example, China (Beijing) is used.​
    String region = "cn-beijing";​
    ​
    //apiclient initialization​
    ApiClient apiClient = new ApiClient()​
    .setCredentials(Credentials.getCredentials(ak, sk))​
    .setRegion(region);​
    ​
    EcsApi ecsApi = new EcsApi(apiClient);​
    ​
    DescribeSystemEventsRequest describeSystemEventsRequest = new DescribeSystemEventsRequest();​
    ​
    //Specify the ID of the instance that you want to query​
    describeSystemEventsRequest.setResourceIds(Arrays.asList("<A Instance ID>","<B Instance ID>","<C Instance ID>"));​
    //Filter the event by the time the event is generated​
    describeSystemEventsRequest.setCreatedAtStart("2023-05-20T01:29:38+08:00");​
    //Filter the event by the time the event ends​
    describeSystemEventsRequest.setCreatedAtEnd("2023-05-25T18:29:38+08:00");​
    ​
    try {​
    DescribeSystemEventsResponse describeSystemEventsResponse = ecsApi.describeSystemEvents(describeSystemEventsRequest);​
    System.out.println(describeSystemEventsResponse);​
    } catch (ApiException e) { ​
    System.out.println(e.getResponseBody());​
    }​
    ​
    }​
    ​
  • Sample response:​
  • ​
    class DescribeSystemEventsResponse {​
    nextToken:​
    systemEvents: [class SystemEventForDescribeSystemEventsOutput { ​
    createdAt: 2023-05-25T14:15:21+08:00​
    id: e-ycfroor651gh9zxxx​
    operatedEndAt: 2023-05-29T11:58:30+08:00​
    operatedStartAt: 2023-05-28T23:58:30+08:00​
    resourceId: <A Instance ID>​
    status: Inquiring​
    type: SystemFailure_Redeploy​
    updatedAt: 2023-05-26T11:58:30+08:00​
    }, class SystemEventForDescribeSystemEventsOutput {​
    createdAt: 2023-05-24T10:27:02+08:00​
    id: e-ycfoo7134kgsnzdvxxx​
    operatedEndAt:​
    operatedStartAt:​
    resourceId: <B Instance ID>​
    status: Succeeded​
    type: CreateInstance​
    updatedAt: 2023-05-24T10:27:12+08:00​
    }, class SystemEventForDescribeSystemEventsOutput {​
    createdAt: 2023-05-23T17:44:17+08:00​
    id: e-ycfmuzgy5im0xxxx​
    operatedEndAt:​
    operatedStartAt:​
    resourceId: <C Instance ID>​
    status: Succeeded​
    type: RunInstance​
    updatedAt: 2023-05-23T17:44:20+08:00​
    }]​
    }​
    ​
  1. Call the UpdateSystemEvents interface to respond to "SystemMaintenance.Redeploy" events. This authorizes platform O&M personnel to redeploy instances and resolve faults.​
tip​
  • Only for "SystemMaintenance.Redeploy" event authorization, the OperatedStartAt and OperatedEndAt parameters can be used to change the maintenance time window.​
  • The OperatedStartAt and OperatedEndAt parameters only support passing in the following time periods:​
  • event occurrence time ~ event occurrence time + 12h​
  • event occurrence time + 12h ~ event occurrence time + 24h​
  • event occurrence time + 24h ~ event occurrence time + 36h​
  • event occurrence time + 36h ~ event occurrence time + 48h​
  • event occurrence time + 48h ~ event occurrence time + 60h​
  • event occurrence time + 60h ~ event occurrence time + 72h​
  • Sample request:​
  • ​
    public void updateEvents(){​
    //Set your AK​
    String ak = "Your AK";​
    //Specify your SK​
    String sk = "Your SK";​
    //Specify the region to be accessed. In this example, China (Beijing) is used.​
    String region = "cn-beijing";​
    ​
    //apiclient initialization​
    ApiClient apiClient = new ApiClient()​
    .setCredentials(Credentials.getCredentials(ak, sk))​
    .setRegion(region);​
    ​
    EcsApi ecsApi = new EcsApi(apiClient);​
    ​
    UpdateSystemEventsRequest updateSystemEventsRequest = new UpdateSystemEventsRequest();​
    //Pass in the ID of the event that needs a response​
    updateSystemEventsRequest.setEventIds(Arrays.asList("e-ycfu1fit1f8hcczyxxx"));​
    //Respond to the event​
    updateSystemEventsRequest.setStatus("Executing");​
    //Specify the time window for redeploying the instance​
    updateSystemEventsRequest.setOperatedStartAt("2023-05-28T23:58:30+08:00");​
    updateSystemEventsRequest.setOperatedEndAt("2023-05-29T11:58:30+08:00");​
    ​
    try {​
    UpdateSystemEventsResponse updateSystemEventsResponse = ecsApi.updateSystemEvents(updateSystemEventsRequest);​
    System.out.println(updateSystemEventsResponse);​
    } catch (ApiException e) {​
    System.out.println(e.getResponseBody());​
    }​
    ​
    }​
    ​
  • Sample response:​
  • ​
    class UpdateSystemEventsResponse {​
    operationDetails: [class OperationDetailForUpdateSystemEventsOutput {​
    error: null​
    eventId: e-ycfu1fit1f8hcczxxx​
    }]​
    }​
    ​
  1. Call DescribeSystemEvents interface, pass in the responded event ID to query the current status of the event and other information.​
  • Sample request:​
  • ​
    public void queryInstanceEvents(){​
    //Specify your AK​
    String ak = "Your AK";​
    //Specify your SK​
    String sk = "Your SK";​
    //Specify the region to be accessed. In this example, China (Beijing) is used.​
    String region = "cn-beijing";​
    ​
    //Initializing apiclient​
    ApiClient apiClient = new ApiClient()​
    .setCredentials(Credentials.getCredentials(ak, sk))​
    .setRegion(region);​
    ​
    EcsApi ecsApi = new EcsApi(apiClient);​
    ​
    DescribeSystemEventsRequest describeSystemEventsRequest = new DescribeSystemEventsRequest();​
    //Specify the ID of the event to be queried​
    describeSystemEventsRequest.setEventIds(Arrays.asList("e-ycfu1fit1f8hcczyxxx"));​
    ​
    try {​
    DescribeSystemEventsResponse describeSystemEventsResponse = ecsApi.describeSystemEvents(describeSystemEventsRequest);​
    System.out.println(describeSystemEventsResponse);​
    } catch (ApiException e) { ​
    System.out.println(e.getResponseBody());​
    }​
    ​
    }​
    ​
  • Sample response:​
  • Response example of an event in Executing status:​
  • ​
    class DescribeSystemEventsResponse {​
    nextToken: ​
    systemEvents: [class SystemEventForDescribeSystemEventsOutput {​
    createdAt: 2023-05-26T11:58:30+08:00​
    id: e-ycfu1fit1f8hcczyxxx​
    operatedEndAt: 2023-05-29T11:58:30+08:00​
    operatedStartAt: 2023-05-28T23:58:30+08:00​
    resourceId: <A Instance ID>​
    status: Executing​
    type: SystemMaintenance_Redeploy​
    updatedAt: 2023-05-26T14:19:19+08:00​
    }]​
    }​
    ​
  • Response example of an event in Succeeded status:​
  • ​
    class DescribeSystemEventsResponse {​
    nextToken: ​
    systemEvents: [class SystemEventForDescribeSystemEventsOutput {​
    createdAt: 2023-05-26T11:58:30+08:00​
    id: e-ycfu1fit1f8hcczyxxx​
    operatedEndAt: 2023-05-29T11:58:30+08:00​
    operatedStartAt: 2023-05-28T23:58:30+08:00​
    resourceId: <A Instance ID>​
    status: Succeeded​
    type: SystemMaintenance_Redeploy​
    updatedAt: 2023-05-28T23:58:30+08:00​
    }]​
    }​
    ​
​
Last updated: 2026.02.05 16:24:47