logstash 子(二级)字段过滤

时间:2018-05-19 16:50:14   收藏:0   阅读:349
logstash的数据源为json,
部分数据

"level" => {
       "levelStr" => "ERROR",
       "level" => 40000
},
"type" => "community",

一、用某个字段作为过滤条件

filter {
    if [type] != "community"{
        drop {}
    }
}

二、用某个二级字段作为过滤条件

filter {
    if [level][levelStr] != "ERROR"{
        drop {}
    }
}

参考:
https://discuss.elastic.co/t/how-to-refer-to-subfield-in-logstash/79474

原文:http://blog.51cto.com/4988084/2118214

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!