logstash 利用drop 丢弃过滤日志

input {
    stdin {
    }
}
filter {

       grok {
            match => ["message","\s*%{TIMESTAMP_ISO8601}\s+(?<Level>(\S+)).*"]
            }

        if [Level] == "DEBUG" {
                drop {}
                }
        if [Level] == "INFO" {
                        drop {}
                }
}

output {
 stdout {
  codec=>rubydebug{}
   }
 }
~   

利用drop 丢弃过滤日志

posted @ 2016-09-15 12:36  czcb  阅读(4493)  评论(0编辑  收藏  举报