I'm attempting to follow the reference guide to make sure certain indexes end up on certain machines. I'm attempting to give 2 of my nodes an attribute named "storage_type", where one node gets "long_term" and one gets "short_term".
I understand that I need to add the attribute of "storage_type" to each of the nodes, and then set each index to have {"index.routing.allocation.require.tag" : "short"} or {"index.routing.allocation.require.tag" : "long"} respectively.
I've attempted to add these settings via curl calls, like most ES things, but it does not appear that I could PUT settings. i.e.:
curl -XPUT localhost:9200/_nodes/my_node_name/_settings -d '{"storage_term" : "short_term"}'
So how do I add these attributes such as "storage_type" (which is n to nodes)? Is it a config file? A command line argument? An HTTP call that I'm missing?
Since version 5.0 node attributes are to be set via node.attr.:
node.attr.storage_term: short_term
See Shard Allocation Filtering section of the official reference.
It's not to be done through curl calls. You need to use elasticsearch.yml.
elasticsearch.yml:node.storage_term: short_term
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With