thiruna
(Thirunavukkarasu)
January 19, 2016, 4:54pm
1
Hello,
We can able to create aliases and filters for the existing indexes without any issues.
However we are not able to create aliases for the new indexes.
Is there any way to create aliases for new (Future) index also in elasticsearch?
Thanks,
Thiru.
warkolm
(Mark Walkom)
January 19, 2016, 9:18pm
2
You cannot add an index that doesn't exist to an alias.
You can setup a template that contains an alias though, that would work.
thiruna
(Thirunavukkarasu)
January 21, 2016, 9:31pm
3
Hi Warkolm,
I have created the template with alias and it's working fine and alias created.
However, when trying alias filter with the template getting below error
"failed action with response of 400, dropping action:"
Anything wrong with this template?
Template :
curl -XPUT 'http://localhost:9200/_template/template_cpu ' -d ' {
"template":"logstash-tools-alias-test-*", "order": 1,"settings":{"index.number_of_replicas":"1"},
"aliases" : { "alias-system-cpu" : {"filter" : { "term" : {"host.raw" : "xxx.xxx " } }, "routing" : "xxx.xxx "} }}'
Thanks,
Thiru.
thiruna
(Thirunavukkarasu)
January 26, 2016, 8:47pm
4
Hello Warkolm,
Did you get a chance to very this Template query which will have alias with filter in it?
Template :
curl -XPUT 'http://localhost:9200/_template/template_cpu ' -d ' {
"template":"logstash-tools-alias-test-*", "order": 1,"settings":{"index.number_of_replicas":"1"},
"aliases" : { "alias-system-cpu" : {"filter" : { "term" : {"host.raw" : "xxx.xxx " } }, "routing" : "xxx.xxx "} }}'
is there anything wrong on this template?
Thanks,
Thiru.