赞
踩
- [
- {
- "partition": 0,
- "offset": 49,
- "msg": "{\"log_timestamp\":1715752796717,\"business\":\"example.business.project\",\"service\":\"example.service\",\"host_ip\":\"YFB-CTO\",\"level\":\"INFO\",\"logger_name\":\"Web.Controllers.RoleController\",\"message\":\"########### \\u8FD9\\u662F\\u624B\\u52A8\\u8F93\\u51FA\\u7684\\u4E2D\\u6587\\u65E5\\u5FD7\\u4FE1\\u606F ###########\",\"request_path\":null,\"request_parameter\":null,\"request_method\":null,\"request_header\":null,\"status_code\":null,\"request_response_time\":0,\"exception\":null}",
- "timespan": 1715752796716,
- "date": "2024-05-15 13:59:56"
- }
- ]
- CREATE ROUTINE LOAD [db.]job_name [ON tbl_name]
- [merge_type]
- [load_properties]
- [job_properties]
- FROM data_source [data_source_properties]
- [COMMENT "comment"]
- CREATE ROUTINE LOAD biz_log_db.ods_example_service_log_routine_load_json ON ods_example_service_log
- COLUMNS(log_timestamp,business,service,host_ip,level,logger_name,message,request_path,request_parameter,request_method,request_header,response_content,status_code,request_response_time,exception,log_time=from_millisecond(log_timestamp))
- PROPERTIES(
- "desired_concurrent_number"="3",
- "max_batch_interval" = "20",
- "max_batch_rows" = "300000",
- "max_batch_size" = "209715200",
- "strict_mode" = "false",
- "format"="json",
- "jsonpaths"="[\"$.log_timestamp\",\"$.business\",\"$.service\",\"$.host_ip\",\"$.level\",\"$.logger_name\",\"$.message\",\"$.request_path\",\"$.request_parameter\",\"$.request_method\",\"$.request_header\",\"$.response_content\",\"$.status_code\",\"$.request_response_time\",\"$.exception\"]"
- )
- FROM KAFKA(
- "kafka_broker_list" = "192.168.2.111:9092,192.168.2.184:9092,192.168.2.156:9092",
- "kafka_topic" = "example-service-log",
- "property.kafka_default_offsets" = "OFFSET_BEGINNING",
- "property.deserializer.encoding" = "UTF-8"
- )
- COMMENT "示例服务日志记录同步 KAFKA ROUTINE LOAD 配置";
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。