logstash 中缺少 grep 过滤器

Missing grep filter in logstash

我正在尝试使用 grep 函数,但它不起作用,

这是错误:

Couldn't find any filter plugin named 'grep'. Are you sure this is correct?    
Trying to load the grep filter plugin resulted in this error: no such file to 
load -- logstash/filters/grep

这是我的文件logstash.conf

input {
stdin { }
file {
type => "FireWall"
path => "/var/log/test.txt"
start_position => 'beginning'
}
}
filter {


grep {

    match =>["message",".* Morito .*"]
 }
grok {

patterns_dir => "./patterns"
   match => [
    "message", "%{WORD:firstname} %{WORD:lastname} %{NUMBER:age}    
]
}
}
output {
stdout { }
elastic search {
cluster => "logstash"
}
}

请问我该怎么办?

grep{} 被弃用,取而代之的是条件语句和 drop{}:

if [message] =~ /regexp/ {
     drop{}
}