logstash 输入压缩文件 gzip类型

配置:

logstash版本:7.0.1

安装插件:bin/logstash-plugin install logstash-codec-gzip_lines 

查看插件列表:bin/logstash-plugin list

注意:mode默认为tail,需要改成read模式,而read参数只有logstash 6.4及以上版本才支持

input { 
  file {
        path => "/Users/mnzhang/Downloads/2.txt.gz"
        mode => "read"
        #codec => "gzip_lines"   必须注释掉,否则会报错
   
    }
}
 

遗留问题:可以正确读取,但是读完2.txt.gz会被删除,如果想流式读取2.txt.gz的更新,目前还不知道怎么搞,不确定logstash是否支持,或者是否有其它日志收集工具?

你可能感兴趣的:(ELK,logstash)