Hi,
I am very new to elastic search. We are using ES to store messages coming from our App. Here is how my index looks like
PUT message_history_index
{
"mappings":{
"notification_history" : {
"dynamic": "strict",
"properties":{
"account_id":{
"type": "integer"
},
"user_id": {
"type": "integer"
},
"created_when": {
"type": "date",
"format": "date_time"
}
}
}
}
}
I want to create monthly indexes and I am trying to automate this. So that at the end of every month there will be automated process to create an index.So all documents created this month will be in message_history_index-2019.02-1
I created a template to create time series index and the used the rollover api to create to do this
PUT _template/message_history_index_template
{
"template": "message_history_index-*",
"settings": {
"number_of_shards": 5,
"number_of_replicas": 0
},
"aliases": {
"search_message_history": {}
}
}
POST active_message_history/_rollover
{
"conditions": {
"max_age": "30d"
}
}
But my problem is that now ill have to manually execute the rollover after every 30 days for it to create the new index.
Is there any way of automating the rollover api in AWS?
How do I create a cron job in AWS to automate this rollover process?
Thanks in advance