日志存储中缺少grep筛选器

日志存储中缺少grep筛选器,grep,logstash,Grep,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 { stdi

我正在尝试使用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{}
}

“现在您可以在logstash配置中执行if/elsif/else操作,不再需要'grep'插件。此插件将在将来删除。如果您需要删除事件,请使用删除筛选器。如果您需要根据匹配执行操作,请使用'if'块和mutate筛选器。有关如何在日志中使用if/elsif/else的详细信息,请参阅以下URL。”ur logstash配置:{logstash_VERSION}/configuration“