In my logstash .conf, filter section when I use "==" it works, but when I replace with "in" it doesn't. Further down in the script, I do use "in" with multiple values, and none of them work either. Am I missing something?
"==" succeeds
filter {
if [app_id.keyword] == ["LoggingService"] {
grok {
"in" fails
filter {
if [app_id.keyword] in ["LoggingService"] {
grok {
RHEL 7, Logstash 6.2.0 then updated to 6.2.3, still doesn't work.
IIRC, The right-hand-side of an in clause gets parsed as a field reference, not as a literal array as you're attempting.
Unfortunately, the grammar is ambiguous, and field references have a higher precedence than literal arrays, so there's not much we can do to fix it without breaking the situation when people do intentionally have a field reference there.
While it is certainly more verbose, using equality along-side or clauses is going to be your best bet:
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.