From the logstash.conf, I want to control the output based on the environment variable. I have tried the following, but it does not work. I find the use of the environment variable is not consistent throughout the configuration file. Is there any good reference on this?
I don't have an issue with the LOGS_DIR. Only the LS_OUTPUT_DEBUG does not work. I support the use of environment variable for conditionals is not supported
Thanks for the suggestion. It works for the LS_OUTPUT_DEBUG now. Wondering if there is a more efficient way.
Say, if I want to use an environment variable to control the filter, does it mean I will have to use mutate with add_field at the very beginning of the filter section?
Hmm. I think I might have spoken too soon. It does not actually work. When I set the LS_OUTPUT_DEBUG=0, it still generates the output file. I am not certain what Logstash sees the value of this environment variable. Is there any way to debug the configuration file?
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.