Event Notification

Products

Virtual Machines

2022-02-25 14:40:35

Event Notification

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.

Event List

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.

Event Format

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":""	
}

Event Notification Details

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.

Instance Creation Failed

  • Event code: SystemFailure.Delete
  • Event notification description: For the event, two notifications will be sent when the deleting starts and when the deleting succeeds after the creation fails (as the deletion will cause the resource status to change, the status change event will be triggered at the same time. for details, please refer to StatusChange below). the details of the event are as follows:

{
	"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"
}

System Exception Instance Migration

  • Event code: SystemFailure.Migrate
  • Event Notification Description: For the event, two notifications will be sent after the migration is started and after the migration is completed. the details of the event are as follows:

{
	"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"
}

System Exception Instance Unavailable

  • Event code: SystemFailure.Fault
  • Event Notification Description: For the event, a notification will be sent after the physical machine fails and the instance is confirmed to be unavailable. the details of the event are as follows:

{
	"eventAction": "SystemFailure.Fault",
	"eventTime": "2021-02-25 09:51:27",
	"instanceId": "i-qj7****e7m"
}

Instance Stop (Resource Expired)

  • Event code: InstanceExpiration.Stop
  • Event Notification Description: For the event, two notifications will be sent after the stop is started and after the stop is completed. the details of the event are as follows:

{
	"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"
}

Instance Deletion (Resource Expired)

  • Event code: InstanceExpiration.Delete
  • Event Notification Description: For the event, two notifications will be sent after the deletion is started and after the deletion is completed. the details of the event are as follows:

{
	"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"
}

Instance Stop (Resource in Arrears)

  • Event code: AccountArrearage.Stop
  • Event Notification Description: For the event, two notifications will be sent after the stop is started and after the stop is completed. the details of the event are as follows:

{
	"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"
}

Instance Deletion (Resource in Arrears)

  • Event code: AccountArrearage.Delete
  • Event Notification Description: For the event, two notifications will be sent after the deletion is started and after the deletion is completed. the details of the event are as follows:

{
	"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"
}

Instance Status Change

  • Event code: StateChange
  • Event Notification Description: Currently, you can only create an instance and delete triggered status change event. for the event, a notification will be sent every time when there is a status change. the notification includes the previous status and the current status. the details of the event are as follows:

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"
}

Subscribe to Event Notification

  • Go to the Cloud Event Service console, click Create Subscription Rules
  • Fill in the custom name and description in Basic Information
  • Make the following selections in the Event Source configuration item:
    • Event Source Type: System Event
    • Event source: Virtual Machine
    • Event type: Select the first-level category of events by referring to the event list above
    • Event filter: Select all events under the event type or specify individual events
    • Subscription object: If you want to subscribe to the **Instance Creation Failed ** event, be sure to select to subscribe to All Objects; for other events, you can select to subscribe to "Some Objects" and specify the resource id subscription
  • in Event Destination, select SMS or email, and add contact person or contact group

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.

Related References

Cloud Event Service

Feedback

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通