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   heidsoft  阅读(124)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫



点击右上角即可分享
微信分享提示