https://help.aliyun.com/document_detail/28979.html
https://tech.antfin.com/docs/2/66659
https://developer.aliyun.com/article/848943
https://www.alibabacloud.com/help/zh/log-service/latest/customize-logtail-plug-ins-to-collect-data
https://help.aliyun.com/document_detail/185095.html
https://help.aliyun.com/document_detail/213461.htm?spm=a2c4g.11186623.0.0.2d727338j573eY#task-2074495
https://help.aliyun.com/document_detail/441604.html?spm=5176.22414175.sslink.12.6ac361e7fswLYL


配置格式
针对json格式的日志文件采集到本地kafa的配置格式:
{
   "metrics": {
       "{config_name1}" : {
           "enable": true,
           "category": "file",
           "log_type": "json_log",
           "log_path": "/root/bin/input_data",
           "file_pattern": "json.log",
           "plugin": {
               "processors": [ 
                {
                   "detail": {
                       "SplitSep": "",
                       "SplitKey": "content"
                    },
                   "type": "processor_split_log_string"
                },
                {
                   "detail": {
                       "ExpandConnector": "",
                       "ExpandDepth": 1,
                       "SourceKey": "content",
                       "KeepSource": false
                    },
                   "type": "processor_json"
                }],
               "flushers":[
                {
                   "type": "flusher_kafka",
                   "detail": {
                       "Brokers":["localhost:9092"],
                       "Topic": "logtail-flusher-kafka"
                    }
                }]
            },
           "version": 1
     },
    "{config_name2}" : {
         ...
     }
 }
}
posted on 2022-07-28 18:44  heidsoft  阅读(115)  评论(0编辑  收藏  举报