Share the kubernetes fields, also share your entire logstash pipeline.
It is pretty hard to troubleshoot things without more context like the entire pipeline and what is the real output.
From what you share I see no issue in the grok filter you are using, it worked for me, so it may have something wrong with your pipeline, or maybe it is not matching the conditional you are using.
idk why is this happen. when i change this line
from:
if [kubernetes][namespace] in ["ff-rr"]{
to:
if [kubernetes][namespace] == "ff-rr" {
it looks work. i tested it before on my local environment using first line, it works well. but when i apply it in production, it's not working. is there any difference between them?
Yes, you cannot use in to test membership of an array with one member. It is parsed as a field reference, so logstash is testing the (non-existent) field ["ff-rr"] and the expression evaluates to false. It's very hard to fix this. It is tracked here.
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.