I have a filter section that removes a field if the event matches with regex. So my if condition is very long.
if [type] == "something" {
if [displayName] =~ /([M-m]as|MAS)[\d]*/ or [displayName] =~ /([E-e]lk|ELK)/ or [displayName] =~ /other regex/ or [displayName] =~ /other regex/ {
mutate {
remove_field => ["[memory]", "[@version]"]
}
}
}
There are numerous displayName values comes from json array. is there another way to handle them? if there is no, how can I break the long if condition line?
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.