I've a token generated by a shell script and stored in a file(api_calls.log)). I wanted the logstash config file to read the file and use the token in the request in http_poller. The token has to be used in Authorization => "Bearer %{token}"
Really appreciate if any body can help in this regard. Below is the config file.
The token is valid for 24hrs, hence have to generate the token everyday and Logstash config had to read the file to fetch the token. When you said inject the token via an environment variable, could you please elaborate bit more for me.
Thank you very much for the solution. I choose the first option to create the config file everyday and use the config reload option to automatically load the config 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.