Logstash之控制台输出的两种方式|第三章-yellowcong

版权声明:本文为博主yellowcong原创文章,未经博主允许不得转载。 https://blog.csdn.net/yelllowcong/article/details/80847425

Logstash 的控制台输出方式,有json的方式和rubydebug 两种格式。

输出json

input{
    file {
            path => "/usr/local/log_test/*/*/*.log"
        start_position => "beginning"
    }   
}
output {
   stdout { 
    codec => json
   }
}

可以看到输出的数据类型是json格式的,而不是 =>这种格式的。
这里写图片描述

输出rubydebug

input{
    file {
            path => "/usr/local/log_test/*/*/*.log"
        start_position => "beginning"
    }   
}
output {
   stdout { 
    codec => rubydebug
   }
}

这里写图片描述

参考文章

https://doc.yonyoucloud.com/doc/logstash-best-practice-cn/output/stdout.html

猜你喜欢

转载自blog.csdn.net/yelllowcong/article/details/80847425