The above approach successfully choose the index and render dashboard accordingly but can it automatically take the latest date "now" and render the latest index so that user have less cognitive load of finding whether dashboard is current or of some earlier date. Can you please let us know if it's possible? or suggest any potential solutions.
Then you can set up an index pattern that uses the alias latest_somestaticname instead of the time series index names and use that index pattern for the dashboard.
However this will require you to update the alias after the new indices are created each day. Would this be possible to integrate into your rollover workflow or a separate cron script?
Another similar idea is to use a Filtered Alias on the pattern somestaticname-*-* and filtering by some date field.
Remove alias from the old index and associate with the new one.
Is there an option where disassociation with last index happens automatically when we associate alias with the latest index? I don't want to write logic to search and remove last associated index.
It can happen in one call where the actions are done in sequence. For example first the remove action removes the alias from all indices with your pattern, and then the add action adds the alias to the most recent index:
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.