You can subscribe to notifications for the following Elastic Block Storage (EBS) events: system events, data disk attaching or detaching, disk retaining, and disk release due to overdue payments.
Events
You can subscribe to notifications for the following EBS events:
System events
EBS system events include only exception events but not O&M events. Elastic Compute Service (ECS) sends notifications when an event starts and when it ends. For information about the event notification names of different system events, see the Appendix: event notification names section in this topic.
The following notifications are sample notifications in the JSON format for a Stalled event that has a severe impact on disk performance.
One notification is sent when the event starts. The initial notification contains the
executeStartTime
parameter.{ "id": "2256A988-0B26-4E2B-820A-8A********E5", "product": "ECS", "resourceId": "acs:ecs:cn-hangzhou:169070********30:disk/d-t4ndyqve********n4ds", "level": "CRITICAL", "name": "Disk:Stalled:Executing", "userId": "169070********30", "eventTime": "20190410T080101.922+0800", "regionId": "cn-hangzhou", "content": { "eventId": "e-t4navn7********6x5no", "diskId": "d-t4ndyqve********n4ds", "device": "/dev/xvdb", "eventType": "Stalled", "executeStartTime": "2019-04-10T01:01:01Z", "ecsInstanceId": "i-bp1ecr********5go2go", "ecsInstanceName": "ecs-instance-name" } }
The other notification is sent when the event ends. Compared with the initial notification, the
executeFinishTime
parameter is added to this notification.{ "id": "2256A988-0B26-4E2B-820A-8A********E5", "product": "ECS", "resourceId": "acs:ecs:cn-hangzhou:169070********30:disk/d-t4ndyqve********n4ds", "level": "CRITICAL", "name": "Disk:Stalled:Executing", "userId": "169070********30", "eventTime": "20190410T080301.922+0800", "regionId": "cn-hangzhou", "content": { "eventId": "e-t4navn7********6x5no", "diskId": "d-t4ndyqve********n4ds", "device": "/dev/xvdb", "eventType": "Stalled", "executeStartTime": "2019-04-10T01:01:01Z", "executeFinishTime": "2019-04-10T01:03:01Z", "ecsInstanceId": "i-bp1ecr********5go2go", "ecsInstanceName": "ecs-instance-name" } }
The following table describes the parameters in the content field.
Parameter | Description | Example |
eventId | The ID of the system event. | e-t4navn7********6x5no |
diskId | The ID of the EBS device whose performance is affected. | d-t4ndyqve********n4ds |
device | The mount point of the EBS device. | /dev/xvdb |
eventType | The type of the system event. Valid values:
| Stalled |
executeStartTime | The start time of the system event. The time is in UTC. | 2019-04-10T01:01:01Z |
executeFinishTime | The end time of the system event. The time is in UTC. | 2019-04-10T01:03:01Z |
ecsInstanceId | The ID of the instance to which the EBS device is attached. | i-bp1ecr********5go2go |
ecsInstanceName | The name of the instance to which the EBS device is attached. | ecs-instance-name |
Data disk attaching or detaching
After a data disk is attached to or detached from an instance, ECS notifies you whether the attach or detach operation is successful. For more information, see Attach a data disk and Detach a data disk.
The following code shows the event notification in the JSON format:
{
"id": "2256A988-0B26-4E2B-820A-8A********E5",
"product": "ECS",
"resourceId": "acs:ecs:cn-hangzhou:169070********30:disk/d-t4ndyqve********n4ds",
"level": "INFO",
"name": "Disk:DiskOperationCompleted",
"userId": "169070********30",
"eventTime": "20190409T121826.922+0800",
"regionId": "cn-hangzhou",
"content": {
"diskId" : "d-t4ndyqve********n4ds",
"operation" : "AttachDisk",
"result" : "accomplished",
"instanceId" : "i-t4ndpdf***********dsa",
"diskType" : "data"
}
}
The following table describes the parameters in the content field.
Parameter | Description | Example |
diskId | The ID of the disk. | d-bp1bwa********9ol4mi |
operation | The type of the operation. Valid values:
| AttachDisk |
result | The result of the operation. Valid values:
Note If the operation is successful, the level value of the event is INFO. If the operation failed, the level value of the event is WARN. | accomplished |
instanceId | The ID of the instance. | i-t4ndpdf***********dsa |
diskType | The disk category. Valid values:
| data |
Disk retaining
You can disable Release Disk with Instance for disks, including system and data disks. The disks are retained and converted to pay-as-you-go data disks when the instances attached to the disks are released. For more information, see Release a disk.
The following code shows the event notification in the JSON format:
{
"id": "2256A988-0B26-4E2B-820A-8A********E5",
"product": "ECS",
"resourceId": "acs:ecs:cn-hangzhou:169070********30:disk/d-t4ndyqve********n4ds",
"level": "INFO",
"instanceName": "disk-event-subscription",
"name": "Disk:ConvertToPostpaidCompleted",
"userId": "169070********30",
"eventTime": "20190409T121826.922+0800",
"regionId": "cn-hangzhou",
"content": {
"diskId" : "d-t4ndyqve********n4ds",
"result" : "accomplished"
}
}
The following table describes the parameters in the content field.
Parameter | Description | Example |
diskId | The ID of the disk. | d-bp1bwa********9ol4mi |
result | The result of the operation. Valid values:
| accomplished |
Disk release due to overdue payments
You may receive a disk release notification in the following scenarios:
Your EBS devices are located in regions inside the Chinese mainland, but real-name verification is not complete for your account.
Your pay-as-you-go disk is released because you have an overdue payment in your account.
The following code shows the event notification in the JSON format:
{
"id": "2256A988-0B26-4E2B-820A-8A********E5",
"product": "ECS",
"resourceId": "acs:ecs:cn-hangzhou:169070********30:disk/d-t4ndyqve********n4ds",
"level": "CRITICAL",
"instanceName": "disk-event-subscription",
"name": "Disk:OverduePaymentRelease",
"userId": "169070********30",
"eventTime": "20190409T121826.922+0800",
"regionId": "cn-hangzhou",
"content": {
"instanceId" : "i-bp1792********an2ukf",
"diskId" : "d-t4ndyqve********n4ds"
}
}
The following table describes the parameters in the content field.
Parameter | Description | Example |
instanceId | The ID of the instance to which the disk is attached. | i-bp1792********an2ukf |
diskId | The ID of the disk. | d-bp1bwa********9ol4mi |
Appendix: event notification names
Impact | Event type and code | Event notification name and code |
Performance degradation | Severe impact on disk performance: Stalled |
|
Local disk damage | Local disks damaged: ErrorDetected |
|