I wrote a logstash config like that, with a lot of if [message]. In this example code below, Im filtering logs and have the problem, that a grok named (%{EMAILADDRESS:sender}) (the opposide of (%{EMAILADDRESS:recipient}) ) is written in my output, which I don't use in this if block . I don't get any grokparse errors and I'm 100% in this if block. For debugging reasons I named to something else and the result was how I assumed.
So my (nasty) idea for a workaround is like (%{EMAILADDRESS:recipient}) == (%{EMAILADDRESS:sender}) then remove_field => "sender".
What's the syntax for comparing these both pattern?
this example below was just for example in in "pseudocode". I tested it in this way.
My idea was to compare, if in the (%{EMAILADDRESS:recipient}) is equal to (%{EMAILADDRESS:sender}). If yes, then remove field sender.
So I have to check if the contenct is equal and put remove_field in the mutate block.
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.