Serverless應(yīng)用引擎事件
本文介紹Serverless應(yīng)用引擎事件通過配置審計(jì)接入,作為事件源發(fā)布到事件總線EventBridge的事件類型。
事件類型
Serverless應(yīng)用引擎支持發(fā)布到事件總線EventBridge的事件類型如下所示。
事件類型 | type參數(shù)值 |
sae:Runtime:SaeK8sUnhealthyEvent | |
sae:Runtime:SaeJobFailEvent | |
sae:Runtime:SaeJobSuccessEvent | |
sae:Runtime:SaeInstanceRestartEvent | |
sae:Runtime:SaeK8sOomKilledEvent | |
sae:Runtime:SaeK8sSuccessfulRescaleEvent | |
sae:ChangeOrder:SaeK8sUnhealthyEvent | |
sae:System:SaeAppSlbConfigResetWarning | |
sae:System:SaeSlbConfigResetWarning | |
sae:ChangeOrder:SaeChangeOrderFailEvent | |
sae:ChangeOrder:SaeWaitBatchConfirmEvent |
CloudEvents規(guī)范中定義的參數(shù)解釋,請(qǐng)參見事件概述。
應(yīng)用運(yùn)行時(shí)健康檢查失敗
應(yīng)用運(yùn)行時(shí)健康檢查失敗,事件總線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應(yīng)用:****-MSGGATE(cn-beijing:****) 在2022-04-15 13:23:29出現(xiàn)應(yīng)用健康檢查失敗(Readiness)!",
"detail": "Readiness probe failed: check http://127.0.XX.XX:10010/im-msg-gate/actuator/health failed\n"
}
}
data字段包含的參數(shù)解釋如下表所示。
參數(shù) | 類型 | 示例值 | 描述 |
source | String | RUNTIME | SAE事件觸發(fā)來源。 |
type | String | SAE_K8S_UNHEALTHY_EVENT | SAE事件類型。 |
level | String | WARNING | SAE事件級(jí)別。取值如下:
|
namespaceId | String | cn-beijing:**** | SAE命名空間ID。 |
resourceId | String | fe4f9fa1-0eef-4957-91a0-**** | SAE應(yīng)用ID。 |
instanceId | String | ****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-**** | SAE應(yīng)用的實(shí)例ID。 |
message | String | 您的SAE應(yīng)用:****-MSGGATE(cn-beijing:****) 在2022-04-15 13:23:29出現(xiàn)應(yīng)用健康檢查失敗(Readiness)! | SAE事件消息內(nèi)容。 |
detail | String | Readiness probe failed: check http://127.0.XX.XX:10010/im-msg-gate/actuator/health failed\n | SAE事件其他詳細(xì)信息。 |
任務(wù)執(zhí)行失敗
任務(wù)執(zhí)行失敗時(shí),事件總線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任務(wù): ****-MSGGATE(cn-beijing:****) 在 2022-08-10 10:45:50 執(zhí)行失敗。創(chuàng)建時(shí)間:2022-08-10 10:40:49,正在運(yùn)行/成功/失敗實(shí)例數(shù):0/0/1,請(qǐng)及時(shí)關(guān)注!",
"detail": "job was active longer than specified deadline"
}
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。
任務(wù)執(zhí)行成功
任務(wù)執(zhí)行成功時(shí),事件總線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任務(wù): ****-MSGGATE(cn-beijing:****) 在 2022-08-09 17:43:40 執(zhí)行成功。創(chuàng)建時(shí)間:2022-08-09 17:43:14,正在運(yùn)行/成功/失敗實(shí)例數(shù):0/1/0。"
}
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。
應(yīng)用運(yùn)行時(shí)出現(xiàn)實(shí)例重啟
應(yīng)用運(yùn)行出現(xiàn)實(shí)例重啟時(shí),事件總線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實(shí)例:demo-*****,所屬應(yīng)用:demo(cn-hangzhou:***)在 2022-08-03 21:32:18發(fā)生重啟,可能原因:Liveness probe failed: check http://127.0.0.1:80/actuator/health failed ,請(qǐng)及時(shí)關(guān)注!",
"detail": "Liveness probe failed: check http://127.0.XX.XX:80/actuator/health failed"
}
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。
應(yīng)用運(yùn)行時(shí)出現(xiàn)OOM
應(yīng)用運(yùn)行出現(xiàn)OOM時(shí),事件總線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實(shí)例:*****,所屬應(yīng)用:****((cn-hangzhou:***)在 2022-08-12 11:40:41 發(fā)生OOM,可能導(dǎo)致該實(shí)例重啟,請(qǐng)及時(shí)關(guān)注!",
"detail": ""
}
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。
應(yīng)用運(yùn)行時(shí)出現(xiàn)彈性伸縮
應(yīng)用運(yùn)行出現(xiàn)彈性伸縮時(shí),事件總線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": "您的應(yīng)用:****(cn-hangzhou:***)在 2022-08-12 11:50:16 觸發(fā)彈性縮容,詳情為 New size: 4; reason: All metrics below target。!",
"detail": "New size: 4; reason: All metrics below target"
}
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。
應(yīng)用變更時(shí)出現(xiàn)健康檢查失敗
應(yīng)用變更時(shí)出現(xiàn)健康檢查失敗,事件總線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應(yīng)用:****-MSGGATE(cn-beijing:****) 在2022-04-15 13:23:29出現(xiàn)應(yīng)用健康檢查失敗(Readiness)!",
"detail": "Readiness probe failed: check http://127.0.XX.XX:10010/im-msg-gate/actuator/health failed\n"
}
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。
產(chǎn)品側(cè)的配置與CLB控制臺(tái)配置不一致
SAE產(chǎn)品側(cè)的配置與CLB控制臺(tái)配置不一致時(shí),事件總線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產(chǎn)品入口對(duì)實(shí)例[ip: %s]修改了%s,和當(dāng)前在SAE應(yīng)用:%s配置的信息沖突,被SAE系統(tǒng)保存的配置強(qiáng)制覆蓋。"
}
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。
產(chǎn)品側(cè)的網(wǎng)關(guān)路由配置與CLB控制臺(tái)配置不一致
SAE產(chǎn)品側(cè)的網(wǎng)關(guān)路由配置與CLB控制臺(tái)的配置不一致時(shí),事件總線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產(chǎn)品入口對(duì)實(shí)例[ip: %s]修改了%s,和當(dāng)前SAE系統(tǒng)保存的網(wǎng)關(guān)路由配置:%s沖突,被SAE系統(tǒng)保存的配置強(qiáng)制覆蓋。"
}
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。
發(fā)布單執(zhí)行失敗
SAE產(chǎn)品側(cè)的發(fā)布單執(zhí)行失敗時(shí),事件總線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發(fā)布單:在2022-04-15 13:23:29執(zhí)行失敗!",
"detail": "Your change order execute fail!\n"
}
}
data字段包含的參數(shù)解釋如下表所示。
參數(shù) | 類型 | 示例值 | 描述 |
source | String | RUNTIME | SAE事件觸發(fā)來源。 |
type | String | SAE_CHANGE_ORDER_FAIL_EVENT | SAE事件類型。 |
level | String | WARNING | SAE事件級(jí)別。取值如下:
|
namespaceId | String | cn-hangzhou:**** | SAE命名空間ID。 |
resourceId | String | fe4f9fa1-0eef-4957-91a0-**** | SAE應(yīng)用ID。 |
instanceId | String | ****-fe4f9fa1-0eef-4957-91a0-081b625efe9b-**** | SAE應(yīng)用的實(shí)例ID。 |
message | String | 您的SAE發(fā)布單:在2022-04-15 13:23:29執(zhí)行失敗! | SAE事件消息內(nèi)容。 |
detail | String | Your change order execute fail!\n | SAE事件其他詳細(xì)信息。 |
應(yīng)用手動(dòng)分批發(fā)布長(zhǎng)時(shí)間未執(zhí)行下一批
SAE應(yīng)用手動(dòng)分批發(fā)布長(zhǎng)時(shí)間未執(zhí)行下一批時(shí),事件總線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應(yīng)用:****-MSGGATE(cn-hangzhou:****) 長(zhǎng)時(shí)間未執(zhí)行下一批!",
"detail": "Your change order has not been operated for a long time\n"
}
關(guān)于data字段包含的參數(shù)解釋,請(qǐng)參見參數(shù)解析。