Event notification is a notification sent for the maintenance of the underlying infrastructure of the platform, the change of important attributes of the resource, or the execution result of some operations in the life cycle of the resource. Based on events, users can learn about the resource dynamics in a timely manner, and improve the automatic operation, maintenance and monitoring process of cloud services.
VMs currently provide the following event notifications:
Event Type | Event Name | Event Code | Event description | Coping advice |
---|---|---|---|---|
Abnormal events | Instance creation failed | SystemFailure.Delete | After the instance creation request is successful, the resources rolled back due to the system reasons will be deleted. | Try to re-create. If still unsuccessful, please contact Customer Services. |
System Abnormal Instance Migration | SystemFailure.Migrate | Physical machine failure Shutdown migration after the instance is unavailable due to a physical machine failure. Shutdown migration after that. | Focus on the business impact. | |
System abnormal instance unavailable | SystemFailure.Fault | The instance is unavailable due to a physical machine failure, but the instance type cannot be migrated (type with local data disks, such as storage-optimized and GPU-based ones). | Contact the Customer Service to confirm that local data can be migrated by background operations after deleted. | |
Amount Overdue/Expiry Description | Instance suspension (resource expired) | InstanceExpiration.Stop | The service will be suspended after the instance under annual/monthly subscription expires. | To continue to use it, please renew and restart; Not to continue to use it, please make sure that important data has been backed up, and then delete it or wait for the system to automatically delete it 7 days later. |
Instance deletion (resource expired) | InstanceExpiration.Delete | Delete 7 days after expiration of instances under annual/monthly subscription. | ||
Instance suspension (resource arrears) | AccountArrearage.Stop | Service suspended upon arrerage of instances billed by configuration. | To continue to use it, please renew and restart; Not to continue to use it, please make sure that important data has been backed up, and then delete it or wait for the system to automatically delete it 7 days later. | |
Instance deletion (resource arrears) | AccountArrearage.Delete | Delete 7 days after arrearage of instances billed by configuration. | ||
Status Change | Instance state change | StateChange | Instance state changes caused by user's operations or system behaviors (currently, the state could be changed only by creation and deletion). | Pay attention if the state changes as expected. |
Virtual machine events are based on services provided by the Cloud events product. An example of the event format is shown below, where detail is the event details. The information items of different events are different. For details, please refer to the Event notification details below.
Take the instance successfully created from pending state to running state as an example
{
"detail":{
"eventAction":"StateChange",
"eventTime":"2021-03-18 11:40:38",
"instanceCurrentState":"running",
"instanceId":"i-eiu****bqp",
"instanceLastState":"pending"
},
"detailType":"StatusNotification",
"id":"1xo6n4os********6g2d5721f2",
"pin":"iaasdevops",
"region":"cn-east-1",
"resources":[
"i-eiuciglbqp"
],
"source":"jcloud.vm",
"time":"2021-03-18T11:49:46+0800",
"version":""
}
The cloud event service provides an event subscription function. You can specify event and resource subscriptions and set event destinations. in notification channels such as SMS and email, event details will be sent in the following form.
{
"eventAction":"SystemFailure.Delete",
"eventState":"Executing",
"eventTime":"2021-02-25 20:13:35",
"instanceId":"i-ai0****net"
}
{
"eventAction":"SystemFailure.Delete",
"eventState":"Executed",
"eventTime":"2021-02-25 20:13:39",
"instanceId":"i-ai0****net"
}
{
"eventAction": "SystemFailure.Migrate",
"eventState":"Executing",
"eventTime": "2021-02-25 06:44:06",
"instanceId": "i-bc4****9oh"
}
{
"eventAction": "SystemFailure.Migrate",
"eventState":"Executed",
"eventTime": "2021-02-25 06:44:26",
"instanceId": "i-bc4****9oh"
}
{
"eventAction": "SystemFailure.Fault",
"eventTime": "2021-02-25 09:51:27",
"instanceId": "i-qj7****e7m"
}
{
"eventAction": "InstanceExpiration.Stop",
"eventState": "Executing",
"eventTime": "2021-02-25 11:00:14",
"instanceId": "i-l16****r0v"
}
{
"eventAction": "InstanceExpiration.Stop",
"eventState": "Executed",
"eventTime": "2021-02-25 11:00:20",
"instanceId": "i-l16****r0v"
}
{
"eventAction": "InstanceExpiration.Delete",
"eventState": "Executing",
"eventTime": "2021-02-25 11:00:14",
"instanceId": "i-l16****r0v"
}
{
"eventAction": "InstanceExpiration.Delete",
"eventState": "Executed",
"eventTime": "2021-02-25 11:00:20",
"instanceId": "i-l16****r0v"
}
{
"eventAction": "AccountArrearage.Stop",
"eventState": "Executing",
"eventTime": "2021-02-25 11:00:14",
"instanceId": "i-l16****r0v"
}
{
"eventAction": "AccountArrearage.Stop",
"eventState": "Executed",
"eventTime": "2021-02-25 11:00:20",
"instanceId": "i-l16****r0v"
}
{
"eventAction": "AccountArrearage.Delete",
"eventState": "Executing",
"eventTime": "2021-02-25 11:00:14",
"instanceId": "i-l16****r0v"
}
{
"eventAction": "AccountArrearage.Delete",
"eventState": "Executed",
"eventTime": "2021-02-25 11:00:20",
"instanceId": "i-l16****r0v"
}
For example: Instance creation succeeded
{
"eventAction": "StateChange",
"eventTime": "2021-02-25 11:00:30",
"instanceCurrentState": "pending",
"instanceId": "i-x0r****q2b",
"instanceLastState": ""
}
{
"eventAction": "StateChange",
"eventTime": "2021-02-25 11:00:52",
"instanceCurrentState": "running",
"instanceId": "i-x0r****q2b",
"instanceLastState": "pending"
}
For example: Instance creation failed
{
"eventAction":"StateChange",
"eventTime":"2021-02-26 19:55:18",
"instanceCurrentState":"pending",
"instanceId":"i-mob****hpa",
"instanceLastState":""
}
{
"eventAction": "StateChange",
"eventTime": "2021-02-26 19:55:39",
"instanceCurrentState": "error",
"instanceId": "i-mob****hpa",
"instanceLastState": "pending"
}
For example: Instance deletion succeeded
{
"eventAction": "StateChange",
"eventTime": "2021-03-19 18:42:14",
"instanceCurrentState": "deleting",
"instanceId": "i-5kh****v3b",
"instanceLastState": "stopped"
}
{
"eventAction": "StateChange",
"eventTime": "2021-03-19 18:42:16",
"instanceCurrentState": "terminated",
"instanceId": "i-5kh****v3b",
"instanceLastState": "deleting"
}
Subscription tips:
Message Management Console Provides notifications for out of service and release of all resources due to being in arrears or expiration, for example, if you subscribe to the Being in Arrears/Expiration event in the virtual machine event at the same time, you will receive two types of notifications, please subscribe to it according to the situation.
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通