Is there any regex can create index alias based on weekly/monthly/yearly?


(Robin Guo) #1

I want to create different date index alias.
Is there any regex can create index alias based on weekly/monthly/yearly?
but the below restful API doesn't work. could anyone help on this?

POST /_aliases
{
"actions": [
{ "add": { "index": "metricbeat-linux-system-{now/w}", "alias": "system" }}
]
}


(Mark Walkom) #2

Those APIs don't do date math for you, you need to do it client side and then make the request.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.