What I am trying to do is having the same logstash.conf file for my test and deployment/shipping. However for testing I want the output to go to my local elastic search, and for deployment to a http address.
I tried using an environment variable into a condition to check if the file is used for testing or not, and then redirect the output accordingly, but environment variables don't seem to be working inside condition.
I also tried using metadata with environment variables, see this example : https://github.com/elastic/logstash/issues/5115#issuecomment-214283550
but it did'nt work either.
Do you know if there is a solution for this or do I have to make 2 separate configuration files?