文档

Serverless应用引擎事件

更新时间:

本文介绍Serverless应用引擎事件通过配置审计接入,作为事件源发布到事件总线EventBridge的事件类型。

事件类型

Serverless应用引擎支持发布到事件总线EventBridge的事件类型如下所示。

事件类型

type参数值

应用运行时健康检查失败

sae:Runtime:SaeK8sUnhealthyEvent

任务执行失败

sae:Runtime:SaeJobFailEvent

任务执行成功

sae:Runtime:SaeJobSuccessEvent

应用运行时出现实例重启

sae:Runtime:SaeInstanceRestartEvent

应用运行时出现OOM

sae:Runtime:SaeK8sOomKilledEvent

应用运行时出现弹性伸缩

sae:Runtime:SaeK8sSuccessfulRescaleEvent

应用变更时出现健康检查失败

sae:ChangeOrder:SaeK8sUnhealthyEvent

产品侧的配置与CLB控制台配置不一致

sae:System:SaeAppSlbConfigResetWarning

产品侧的网关路由配置与CLB控制台配置不一致

sae:System:SaeSlbConfigResetWarning

发布单执行失败

sae:ChangeOrder:SaeChangeOrderFailEvent

应用手动分批发布长时间未执行下一批

sae:ChangeOrder:SaeWaitBatchConfirmEvent

CloudEvents规范中定义的参数解释,请参见事件概述

应用运行时健康检查失败

应用运行时健康检查失败,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:Runtime:SaeK8sUnhealthyEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "RUNTIME",
        "type": "SAE_K8S_UNHEALTHY_EVENT",
        "level": "WARNING",
        "namespaceId": "cn-beijing:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****",
        "instanceId": "****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-****",
        "message": "您的SAE应用:****-MSGGATE(cn-beijing:****) 在2022-04-15 13:23:29出现应用健康检查失败(Readiness)!",
        "detail": "Readiness probe failed: check http://127.0.XX.XX:10010/im-msg-gate/actuator/health failed\n"
    }
}
            

data字段包含的参数解释如下表所示。

参数

类型

示例值

描述

source

String

RUNTIME

SAE事件触发来源。

type

String

SAE_K8S_UNHEALTHY_EVENT

SAE事件类型。

level

String

WARNING

SAE事件级别。取值如下:

  • WARNING:警告。

  • INFO:通知。

namespaceId

String

cn-beijing:****

SAE命名空间ID。

resourceId

String

fe4f9fa1-0eef-4957-91a0-****

SAE应用ID。

instanceId

String

****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-****

SAE应用的实例ID。

message

String

您的SAE应用:****-MSGGATE(cn-beijing:****) 在2022-04-15 13:23:29出现应用健康检查失败(Readiness)!

SAE事件消息内容。

detail

String

Readiness probe failed: check http://127.0.XX.XX:10010/im-msg-gate/actuator/health failed\n

SAE事件其他详细信息。

任务执行失败

任务执行失败时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:Runtime:SaeJobFailEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "RUNTIME",
        "type": "SAE_JOB_FAIL_EVENT",
        "level": "WARNING",
        "namespaceId": "cn-beijing:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****",
        "message": "您的SAE任务: ****-MSGGATE(cn-beijing:****) 在 2022-08-10 10:45:50 执行失败。创建时间:2022-08-10 10:40:49,正在运行/成功/失败实例数:0/0/1,请及时关注!",
        "detail": "job was active longer than specified deadline"
    }
}

关于data字段包含的参数解释,请参见参数解析

任务执行成功

任务执行成功时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:Runtime:SaeJobSuccessEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "RUNTIME",
        "type": "SAE_JOB_SUCCESS_EVENT",
        "level": "INFO",
        "namespaceId": "cn-beijing:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****",
        "message": "您的SAE任务: ****-MSGGATE(cn-beijing:****) 在 2022-08-09 17:43:40 执行成功。创建时间:2022-08-09 17:43:14,正在运行/成功/失败实例数:0/1/0。"
    }
}

关于data字段包含的参数解释,请参见参数解析

应用运行时出现实例重启

应用运行出现实例重启时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:Runtime:SaeInstanceRestartEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": { 
      "source": "RUNTIME",
      "type": "SAE_INSTANCE_RESTART_EVENT",
      "level": "WARNING",
      "namespaceId": "cn-hangzhou:****",
      "resourceId": "fe4f9fa1-0eef-4957-91a0-****", 
      "instanceId": "****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-****",
      "message": "您的SAE实例:demo-*****,所属应用:demo(cn-hangzhou:***)在 2022-08-03 21:32:18发生重启,可能原因:Liveness probe failed: check http://127.0.0.1:80/actuator/health failed ,请及时关注!",
      "detail": "Liveness probe failed: check http://127.0.XX.XX:80/actuator/health failed"
    }
}
            

关于data字段包含的参数解释,请参见参数解析

应用运行时出现OOM

应用运行出现OOM时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:Runtime:SaeK8sOomKilledEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "RUNTIME",
        "type": "SAE_K8S_OOM_KILLED_EVENT",
        "level": "WARNING",
        "namespaceId": "cn-hangzhou:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****", 
        "instanceId": "****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-****",
        "message": "您的SAE实例:*****,所属应用:****((cn-hangzhou:***)在 2022-08-12 11:40:41 发生OOM,可能导致该实例重启,请及时关注!",
        "detail": ""
    }
}

关于data字段包含的参数解释,请参见参数解析

应用运行时出现弹性伸缩

应用运行出现弹性伸缩时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:Runtime:SaeK8sSuccessfulRescaleEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "RUNTIME",
        "type": "SAE_K8S_SUCCESSFUL_RESCALE_EVENT",
        "level": "Info",
        "namespaceId": "cn-hangzhou:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****", 
        "instanceId": "****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-****",
        "message": "您的应用:****(cn-hangzhou:***)在 2022-08-12 11:50:16 触发弹性缩容,详情为 New size: 4; reason: All metrics below target。!",
        "detail": "New size: 4; reason: All metrics below target"
    }
}
            

关于data字段包含的参数解释,请参见参数解析

应用变更时出现健康检查失败

应用变更时出现健康检查失败,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:Runtime:SaeK8sUnhealthyEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42Z",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "RUNTIME",
        "type": "SAE_K8S_UNHEALTHY_EVENT",
        "level": "WARNING",
        "namespaceId": "cn-beijing:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****",
        "instanceId": "****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-****",
        "message": "您的SAE应用:****-MSGGATE(cn-beijing:****) 在2022-04-15 13:23:29出现应用健康检查失败(Readiness)!",
        "detail": "Readiness probe failed: check http://127.0.XX.XX:10010/im-msg-gate/actuator/health failed\n"
    }
}

关于data字段包含的参数解释,请参见参数解析

产品侧的配置与CLB控制台配置不一致

SAE产品侧的配置与CLB控制台配置不一致时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:System:SaeAppSlbConfigResetWarning",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "SYSTEM",
        "type": "SAE_APP_SLB_CONFIG_RESET_WARNING",
        "level": "WARNING",
        "namespaceId": "cn-hangzhou:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****",
        "message": "由于您在SLB产品入口对实例[ip: %s]修改了%s,和当前在SAE应用:%s配置的信息冲突,被SAE系统保存的配置强制覆盖。"
    }
}

关于data字段包含的参数解释,请参见参数解析

产品侧的网关路由配置与CLB控制台配置不一致

SAE产品侧的网关路由配置与CLB控制台的配置不一致时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:System:SaeSlbConfigResetWarning",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "SYSTEM",
        "type": "SAE_SLB_CONFIG_RESET_WARNING",
        "level": "WARNING",
        "namespaceId": "cn-hangzhou:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****",
        "message": "由于您在SLB产品入口对实例[ip: %s]修改了%s,和当前SAE系统保存的网关路由配置:%s冲突,被SAE系统保存的配置强制覆盖。"
    }
}

关于data字段包含的参数解释,请参见参数解析

发布单执行失败

SAE产品侧的发布单执行失败时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:ChangeOrder:SaeChangeOrderFailEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42Z",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "CHANGE_ORDER",
        "type": "SAE_CHANGE_ORDER_FAIL_EVENT",
        "level": "WARNING",
        "namespaceId": "cn-hangzhou:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****",
        "message": "您的SAE发布单:在2022-04-15 13:23:29执行失败!",
        "detail": "Your change order execute fail!\n"
    }
}

data字段包含的参数解释如下表所示。

参数

类型

示例值

描述

source

String

RUNTIME

SAE事件触发来源。

type

String

SAE_CHANGE_ORDER_FAIL_EVENT

SAE事件类型。

level

String

WARNING

SAE事件级别。取值如下:

  • WARNING:警告。

  • INFO:通知。

namespaceId

String

cn-hangzhou:****

SAE命名空间ID。

resourceId

String

fe4f9fa1-0eef-4957-91a0-****

SAE应用ID。

instanceId

String

****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-****

SAE应用的实例ID。

message

String

您的SAE发布单:在2022-04-15 13:23:29执行失败!

SAE事件消息内容。

detail

String

Your change order execute fail!\n

SAE事件其他详细信息。

应用手动分批发布长时间未执行下一批

SAE应用手动分批发布长时间未执行下一批时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.sae",
    "specversion": "1.0",
    "subject": "acs.sae:cn-hangzhou:123456789098****:215672",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "sae:ChangeOrder:SaeWaitBatchConfirmEvent",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42Z",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "data": {
        "source": "CHANGE_ORDER",
        "type": "SAE_WAIT_BATCH_CONFIRM_EVENT",
        "level": "INFO",
        "namespaceId": "cn-hangzhou:****",
        "resourceId": "fe4f9fa1-0eef-4957-91a0-****",
        "message": "您的SAE应用:****-MSGGATE(cn-hangzhou:****) 长时间未执行下一批!",
        "detail": "Your change order has not been operated for a long time\n"
    }

关于data字段包含的参数解释,请参见参数解析