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