All Products
Search
Document Center

System events

Last Updated: Oct 11, 2021

Background information

This topic provides an overview of the notifications for Elastic Compute Service (ECS) events. Event notifications are designed to provide information about resource changes. Event notifications enable you to configure message processing middleware for events to implement event-driven automated O&M and replace SDK polling. Operation Orchestration Service (OOS) supports event notifications, including notifications of the template execution status and task execution status. For more information, see View system events and System event-triggered alerts.

Notifications of template execution status

OOS sends notifications when the execution status of a template changes.

  1. OOS sends event notifications only when the execution status of a template changes to Failed.

  2. OOS does not send event notifications for a child execution created by a cloud product action.

Notification format

{
        "ver": "1.0",
        "id": "2256A988-0B26-4E2B-820A-8A0580D0B8E5",
        "product": "OOS",
        "resourceId": "acs:ecs:cn-hangzhou:169070********30:execution/exec-abc1792gcdoonr9an2uk",
        "level": "INFO",
        "name": "Execution:ExecutionStatusChange",
        "userId": "169070********30",
        "eventTime": "20190409T121826.922+0800",
        "regionId": "cn-hangzhou",
        "content": {
                    "executionId" : "exec-abc1792gcdoonr9an2uk",
                    "status" : "Success",
                    "templateId" : "t-89fb84c218e84fd58e14",
                     "templateVersion" : "v8",
                    "templateName" : "templateName",
                    "executedBy" : "admin(1234567)",
                    "startTime" : "2019-11-11T12:00Z",
                    "endTime" : "2019-11-11T13:00Z",
                    "duration" : 360,
                    "parentExecutionId" : "exec-3816c2a99c9146979da6"
        }
}

Event attributes

The following table describes fixed top-level fields of a notification.

Field

Description

Example

id

The ID of the event.

9435EAD6-3CF6-4494-8F7A-3A********77

eventTime

The time when the event occurred (UTC+8).

20181226T220114.058+0800

level

The level of the event.

INFO

name

The name of the event.

Execution:StatusChange

product

The name of the product. Valid value: OOS.

OOS

regionId

The ID of the region where the event occurred.

cn-hangzhou

resourceId

The Aliyun Resource Name (ARN) of the resource.

acs:ecs:cn-hangzhou:1169070********30:execution/exec-abc1792gcdoonr9an2uk

userId

The user account ID.

169070********30

content

The event details. The following table describes sub-fields in the content field.

None

The following table describes sub-fields in the content field.

Field

Description

Example

executionId

The execution ID of the template.

exec-abc1792gcdoonr9an2uk

status

The execution status of the template.

Success

templateId

The ID of the template.

t-89fb84c218e84fd58e14

templateVersion

The version of the template.

v8

templateName

The name of the template.

templateName

executedBy

The user who executes the template.

admin(1234567)

startTime

The start time of the execution.

2019-11-11T11:00:00Z

endTime

The end time of the execution.

2019-11-11T11:00:02Z

duration

The time taken to execute the template. Unit: seconds.

parentExecutionId

The ID of the parent execution.

exec-3816c2a99c9146979da6

Notifications of task execution status

OOS sends notifications when the execution status of a template task changes.

  1. OOS sends event notifications only when the execution status of a task changes to Failed.

  2. OOS does not send event notifications for a task created by a cloud product action.

Notification format

{
        "ver": "1.0",
        "id": "2256A988-0B26-4E2B-820A-8A0580D0B8E5",
        "product": "OOS",
        "resourceId": "acs:ecs:cn-hangzhou:169070********30:taskexecution/task-exec-abc1792gcdoonr9an2uk",
        "level": "INFO",
        "name": "TaskExecution:StatusChange",
        "userId": "169070********30",
        "eventTime": "20190409T121826.922+0800",
        "regionId": "cn-hangzhou",
        "content": {
                    "taskExecutionId" : "task-exec-abc",
                    "taskAction" : "ACS::ExecuteApi",
                    "taskName" : "taskName",
                    "executionId" : "exec-18864d6b80a448dcbe62",
                    "status" : "Success",
                    "templateId" : "t-89fb84c218e84fd58e14",
                    "templateVersion" : "v8",
                    "templateName" : "templateName",
                    "startTime" : "2019-11-11T12:00Z",
                    "endTime" : "2019-11-11T12:01Z",
                    "duration" : 60
        }
}

Event attributes

The following table describes fixed top-level fields of a notification.

Field

Description

Example

id

The ID of the event.

9435EAD6-3CF6-4494-8F7A-3A********77

eventTime

The time when the event occurred, in UTC+8.

20181226T220114.058+0800

level

The level of the event.

INFO

name

The name of the event.

TaskExecution:StatusChange

product

The name of the product. Valid value: OOS.

OOS

regionId

The ID of the region where the event occurred.

cn-hangzhou

resourceId

The Aliyun Resource Name (ARN) of the resource.

acs:ecs:cn-hangzhou:169070********30:taskexecution/task-exec-abc1792gcdoonr9an2uk

userId

The user account ID.

169070********30

content

The event details, which can contain one or more sub-fields. The following table describes sub-fields in the content field.

None

The following table describes sub-fields in the content field.

Field

Description

Example

taskExecutionId

The execution ID of the task.

task-exec-abc1792gcdoonr9an2uk

status

The execution status of the task.

Success

taskAction

The action of the task.

ACS::ExecuteApi

taskName

The name of the task.

taskName

executionId

The execution ID.

exec-18864d6b80a448dcbe62

templateId

The ID of the template.

t-89fb84c218e84fd58e14

templateVersion

The version of the template.

v8

templateName

The name of the template.

templateName

executedBy

The user who executes the task.

admin(1234567)

startTime

The start time of the task execution.

2019-11-11T11:00:00Z

endTime

The end time of the task execution.

2019-11-11T11:00:01Z

duration

The time taken to execute the task. Unit: seconds.

60