Can someone please help me understand why the following "drop" filter is not working?
As you can see, the original [message] field is in [json][log][message] but is renamed to [log][message] in the second filter. I have confirmed (by using debug) that Logstash does indeed see the "message" as [log][message], but the filter to drop the message is not working.
if [json] {
mutate {
id => "filter-move-object-to-log"
rename => { "[json]" => "[log]" }
}
}
if [log][message] =~ /The client method is deprecated as of redis-rb 4.0.0, please use the new _clientmethod instead/ {
drop {
id => "filter-drop-redis-dep-notice"
}
}
if [message] =~ /The client method is deprecated as of redis-rb 4.0.0, please use the new _clientmethod instead/ {
drop {
id => "filter-drop-redis-dep-notice"
}
}
So, even though Logstash debug shows the field at [log][message], the rule only succeeds if I specify [message]. Can someone help me understand why?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.