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.

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