Elasticsearch and dynamic aliases
<p>I use Elasticsearch 2.3 with fluentd/logstash and kibana and have fluentd/logstash writing to the index logstash-YYYY.MM.dd</p>

<p>But because mistakes happen and I would like to be able to re-index my data I would instead like to write to the alias logstash-YYYY.MM.dd-alias.</p>

<p>This is what I can do: </p>

<ul>
<li>Create an index with index template and auto-created the alias using
<code>{ aliases: {"{index}-alias":{}}}</code></li>
<li>Write to the alias for the rest of the day</li>
</ul>

<p>The problem is: Let's say it is 2016-04-12. On the new day, the index "logstash-2016.04.13" does not exist and hence neither its alias "logstash-2016.04.13-alias". So instead of creating both, Elasticsearch creates "logstash-2016.04.13-alias" and its alias "logstash-2016.04.13-alias-alias"</p>

<ul>
<li>Possible solution: Have a cronjob running to create the index 5 minutes before midnight.</li>
</ul>

<p>Downside: Cronjob server can go down. Timezone issues can occur. Other errors lead to more errors. </p>

<p>Is there any other way to manage writing to an alias using a date format without having to create the index+alias pair beforehand?</p>