This topic describes how to create a custom event source of the Log Service type in the EventBridge console.
Prerequisites
Procedure
Sample event
{
"datacontenttype": "application/json;charset=utf-8",
"aliyunaccountid": "175299981560****",
"data": {
"key1": "value1",
"key2": "value2",
"__topic__": "test_topic",
"__source__": "test_source",
"__client_ip__": "122.231.XX.XX",
"__receive_time__": "1663487595",
"__pack_id__": "59b662b2257796****"
},
"subject": "acs:log:cn-qingdao:175299981560****:project/qiingdaoproject/logstore/qingdao-logstore-1",
"aliyunoriginalaccountid": "175299981560****",
"source": "test-SLS",
"type": "sls:connector",
"aliyunpublishtime": "2022-09-18T07:53:15.387Z",
"specversion": "1.0",
"aliyuneventbusname": "qingdaoBus",
"id": "qiingdaoproject-qingdao-logstore-1-1-MTY2MzExODM5ODY4NjAxOTQyMw****",
"time": "2022-09-18T07:53:12Z",
"aliyunregionid": "cn-qingdao",
"aliyunpublishaddr": "10.50.XX.XX"
}
For more information about the parameters defined in the CloudEvents specification, see Overview.
The following table describes the parameters contained in data. The parameters that are prefixed and suffixed with an underscore (_) are the system fields of Log Service. For more information about system fields, see Reserved fields.
Parameter | Type | Example | Description |
---|---|---|---|
key1 | String | testKey | The field in the log of the user. |
__topic__ | String | testTopic | The topic of the log. |
__source__ | String | testSource | The device from which the log is collected. |
__client_ip__ | String | 122.231.XX.XX | The IP address of the host where the log resides. |
__receive_time__ | String | 1663487595 | The time when the log arrives at the server. |
__pack_id__ | String | 59b662b2257796**** | The unique ID of the log group to which the log belongs. |