Hi Team,
I have following configuration in my logstash.conf file.
irresepective of the value in ${ENV}, always else block is getting executed.
Same piece of code used to work with logstash older versions (2.X and 6.x).
Could you please help in this regard.
Thanks.
filter
{
if "${ENV}" in [ “env1”, “env2" ] {
mutate{…1}
} else{
mutate{…2}
}
}
You have to show values from "IF", pls use debug mode.
From 8.4 documentation: You can use the in operator to test whether a field contains a specific string, key, or list element. Note that the semantic meaning of in can vary, based on the target type. For example, when applied to a string. in means "is a substring of". When applied to a collection type, in means "collection contains the exact value".
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.