I have logstash pulling the full contents of an index from elastic on a daily basis. In elastic a new index is created every day that contains that days data, it's called index-YYYY-MM-DD.
Basically my question is how do I get logstash to enter todays date into the index name? My input code is:
At the moment I'm just testing so running it manually, I hope to have it running as a service with a CRON job to pull the data daily once I've got it working
Well, either way it's not running continuously so you can set an environment variable to today's date and reference that variable in your configuration via the ${VARIABLE_NAME} notation.
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.