Logstash : use environment variable
I have tried to follow the documentation https://www.elastic.co/guide/en/logstash/current/environment-variables.html but it does not seem to work. I have a bunch of log files to process. Say I have an input file /share/log-2017.09.07.json that I am trying to process with logstash. An excerpt of my logstash config file is as follows : input { file { 'exclude' => ['*.gz'] 'path' => ["/share/log-${INPUT_DATE}.json"] 'type' => 'json' start_position => "beginning" codec => json sincedb_path => "/dev/null" } } I launch logstash as follows : export INPUT_DATE="2017.09.07" logstash -f myconfigfile.con
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.