How to dynamically add an index to alias when index is dynamically created every day? I'm using Logstash to send data to our ElasticSearch engine, version 6.1.1, with the following convention:
elasticsearch {
hosts => "10.01.01.01:9200"
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
}
This dynamically creates a new index per day. I configured the system based on install instructions for this version.
I created an alias to be able to query across all index types (Filebeat/Winlogbeat/etc).
How can I dynamically make all dynamic indexes be added to this alias to avoid having a system administrator perform a daily task to add the index, like: (using Kibana DevTools)
POST /_aliases
{
"actions": [
{ "add": { "index": "winlogbeat-6.1.1-2018.02.16", "alias": "myaliasname"}}
]
}