I've been trying to get environment variables to work in 5.2.x, but no matter how I try to set them Logstash does not recognize them.
I've tried setting up them up as permanent system environment variables, and I also tried adding them the /etc/default/logstash. But, logstash does not see the variables when it's running as a service, nor does it work if I run logstash directly bin/logstash -f /path/logs.conf
But, if I upgrade to 5.5.x, things start to work in these cases...
Logstash running as a service pipeline, the variables are read from /etc/defaults/logstash
Logstash from the commandline bin/logstash -f /path/logs.conf, the variables are read from the linux system environment variables.
So, a few questions:
- Can someone please confirm if this is a defect with 5.2.x?
- If this is not a defect in 5.2.x, then what am I doing wrong? How do I get this to work with 5.2.x?
Upgrading to 5.5.x is NOT a preferred path to resolve this unless there is absolutely no workable solution in 5.2.x.
My company requires a lengthy upgrade approval process, which we don't want to deal with right now, so if there's a workable solution for 5.2.x please point me to it.
If it's a defect that is only resolved in later versions of logstash please let me know.