I make a config for logstash ,
I want if the logs match logtype==request and env==prd , it will save to Bucket 1
If the logstash logtype==request and env==stg , i will save to Bucket2.
However, there is something wrong. All logs saved on Bucket 1. I don't know why.
Is there something wrong with my config. Please help me to fix that.
Your configuration looks okay. Have you verified that the logtype and env fields have the values you expected, i.e. that they're not all equal to "request" and "prd"? Have you made sure that you don't have a leftover configuration file in /etc/logstash/conf.d that contains an s3 output declaration that unconditionall saves everything to bucket 1?
@magnusbaeck: I checked my configure many times. The logtype and env are correct.
I don't have any leftover configure to make all logs save on bucket 1. It's weird.
Do you have any idea to debug this issue ? Actually, the full config is following . Because I want to all log save into ES also, some logs go to S3 bucket.
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.