本文介绍云消息队列 RocketMQ 版通过操作审计和配置审计接入,作为事件源发布到事件总线EventBridge的事件类型。
事件类型
云消息队列 RocketMQ 版支持发布到事件总线EventBridge的事件类型如下所示。
事件类型 | type参数值 |
ons:Instance:InstanceQpsThresholdExceeded | |
ons:Instance:InstanceMinerVersionUpgradeScheduled | |
ons:Instance:InstanceMinerVersionUpgradeExecuting | |
ons:Instance:InstanceMinerVersionUpgradeExecuted | |
ons:Instance:InstanceMinerVersionUpgradeCanceled | |
阿里云平台对资源执行的操作事件 | ons:ActionTrail:AliyunServiceEvent |
API调用 | ons:ActionTrail:ApiCall |
控制台的操作事件 | ons:ActionTrail:ConsoleOperation |
资源变更投递 | ons:Config:ConfigurationItemChangeNotification |
资源评估不合规通知 | ons:Config:NonCompliantNotification |
CloudEvents规范中定义的参数解释,请参见事件概述。
实例QPS超限事件
实例QPS超过限流阈值时,事件总线EventBridge接收到的示例事件如下所示。
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ons",
"specversion": "1.0",
"subject": "acs.ons:cn-hangzhou:123456789098****:215672",
"time": "2020-11-19T21:04:41+08:00",
"type": "ons:Instance:InstanceQpsThresholdExceeded",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42.179PRC",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"instanceId":"MQ_INST_gg****",
"totalThrottleTimes":1300,
"threshold":1000,
"timestamp":1000000000000,
"details":{
"produceDetails":[
{
"topic":"TRADE01",
"messageType":"normal|fifo|transaction|delay",
"throttleTimes":9999
}
],
"consumeDetails":[
{
"topic":"TRADE01",
"consumerGroup":"GID-test",
"throttleTimes":100
}
]
}
}
}
data字段包含的参数解释如下表所示。
参数 | 类型 | 示例值 | 描述 |
instanceId | String | MQ_INST_gg**** | 云消息队列 RocketMQ 版实例ID。 |
totalThrottleTimes | Number | 1300 | 被限流总次数。 |
threshold | Number | 1000 | 限流阈值。 |
timestamp | Number | 1000000000000 | 时间戳。 |
details | Object | 限流信息详情。 | |
produceDetails | Array | 发送限流详情。 | |
topic | String | TRADE01 | 被限流Topic。 |
messageType | String | normal|fifo|transaction|delay | 消息类型。 |
throttleTimes | Number | 9999 | 限流次数。 |
consumeDetails | Array | 消费限流详情。 | |
consumerGroup | String | GID-test | 消费组ID。 |
兼容版本升级
服务端版本兼容升级时,事件总线EventBridge接收到的示例事件如下所示。
{
"data":{
"instanceId":"rmq-xxxxxxxx",
"category":"maintenance",
"level":"info",
"details":{
"destVersion":"5.0-rmq-20230324-1",
"scheduleTime":"1678675586000",
"scheduleLatestTime":"1678675586000",
"upgradeType":"0",
"taskId":"355****"
}
},
"id":"45ef4dewdwe1-7c35-447a-bd93-fab****",
"source":"acs.ons",
"specversion":"1.0",
"subject":"acs:rocketmq:cn-hangzhou:138015630679******:instance/rmq-******",
"time":"2020-11-19T21:04:41",
"type":"ons:Instance:InstanceMinerVersionUpgradeScheduled",
"aliyunaccountid":"138015630679****",
"aliyunpublishtime":"2020-11-19T21:04:42.179",
"aliyuneventbusname":"default",
"aliyunregionid":"cn-hangzhou",
"aliyunpublishaddr":"172.25.XX.XX"
}
data字段包含的参数解释如下表所示。
参数 | 类型 | 示例值 | 描述 |
instanceId | String | rmq-xxxxxxxx | 实例ID。 |
category | String | maintenance | 场景分类。取值如下:
|
level | String | info | 事件级别。取值如下:
|
details | Object | 事件详情。 | |
destVersion | String | 5.0-rmq-20230324-1 | 目标版本。 |
scheduleTime | String | 1678675586000 | 计划执行时间。单位:毫秒。 |
scheduleLatestTime | String | 1678675586000 | 最晚执行时间。单位:毫秒。 |
upgradeType | String | 0 | 升级类型。取值如下:
|
taskId | String | 355**** | 升级任务ID。 |
兼容版本升级开始执行
当服务端版本兼容升级开始执行时,事件总线EventBridge接收到的示例事件如下所示。
{
"data":{
"instanceId":"rmq-xxxxxxxx",
"category":"maintenance",
"level":"info",
"details":{
"originVersion":"5.0-rmq-20230324-1",
"destVersion":"5.1-rmq-20230324-1",
"scheduleTime":"1678675586000",
"scheduleLatestTime":"1678675586000",
"upgradeType":"0",
"taskId":"355****"
}
},
"id":"45ef4dewdwe1-7c35-447a-bd93-fab****",
"source":"acs.ons",
"specversion":"1.0",
"subject":"acs:rocketmq:cn-hangzhou:138015630679****:instance/rmq-cn-*****",
"time":"2020-11-19T21:04:41",
"type":"ons:Instance:InstanceMinerVersionUpgradeExecuting",
"aliyunaccountid":"138015630679****",
"aliyunpublishtime":"2020-11-19T21:04:42.179",
"aliyuneventbusname":"default",
"aliyunregionid":"cn-hangzhou",
"aliyunpublishaddr":"172.25.XX.XX"
}
data字段包含的参数解释如下表所示。
参数 | 类型 | 示例值 | 描述 |
instanceId | String | rmq-xxxxxxxx | 实例ID。 |
category | String | maintenance | 场景分类。取值如下:
|
level | String | info | 事件级别。取值如下:
|
details | Object | 事件详情。 | |
originVersion | String | 5.0-rmq-20230324-1 | 当前版本。 |
destVersion | String | 5.1-rmq-20230324-1 | 目标版本。 |
scheduleTime | String | 1678675586000 | 计划执行时间。 |
scheduleLatestTime | String | 1678675586000 | 最晚执行时间。 |
upgradeType | String | 0 | 升级类型。取值如下:
|
taskId | String | 355**** | 升级任务ID。 |
兼容版本升级完成
当服务端版本兼容升级完成时,事件总线EventBridge接收到的示例事件如下所示。
{
"data":{
"instanceId":"rmq-xxxxxxxx",
"category":"maintenance",
"level":"info",
"details":{
"destVersion":"5.1.1-update1111",
"scheduleTime":"1678675586000",
"scheduleLatestTime":"1678675586000",
"upgradeType":"",
"taskId":""
}
},
"id":"45ef4dewdwe1-7c35-447a-bd93-fab****",
"source":"acs.ons",
"specversion":"1.0",
"subject":"acs:rocketmq:cn-hangzhou:138015630679****:instance/rmq-******",
"time":"2020-11-19T21:04:41",
"type":"ons:Instance:InstanceMinerVersionUpgradeExecuted",
"aliyunaccountid":"138015630679****",
"aliyunpublishtime":"2020-11-19T21:04:42.179",
"aliyuneventbusname":"default",
"aliyunregionid":"cn-hangzhou",
"aliyunpublishaddr":"172.25.XX.XX"
}
关于data字段包含的参数解释,请参见参数解析。
兼容版本升级取消
当服务端版本兼容升级取消时,事件总线EventBridge接收到的示例事件如下所示。
{
"data":{
"instanceId":"rmq-xxxxxxxx",
"category":"maintenance",
"level":"info",
"details":{
"destVersion":"5.1.1-update1111",
"scheduleTime":"1111",
"scheduleLatestTime":"22222",
"upgradeType":"",
"taskId":"",
"cancelReason":""
}
},
"id":"45ef4dewdwe1-7c35-447a-bd93-fab****",
"source":"acs.ons",
"specversion":"1.0",
"subject":"acs:rocketmq:cn-hangzhou:138015630679*****:instance/rmq-cn-wwo3******",
"time":"2020-11-19T21:04:41",
"type":"ons:Instance:InstanceMinerVersionUpgradeCanceled",
"aliyunaccountid":"138015630679****",
"aliyunpublishtime":"2020-11-19T21:04:42.179",
"aliyuneventbusname":"default",
"aliyunregionid":"cn-hangzhou",
"aliyunpublishaddr":"172.25.XX.XX"
}
关于data字段包含的参数解释,请参见参数解析。