> 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.

So generate the configuration file every 24 hours and have Logstash's auto config reload pick up the new file.

> When you said inject the token via an environment variable, could you please elaborate bit more for me.


Injecting the token via en environment variable obviously requires Logstash to be restarted if you want it to pick up a new token.

NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB