VincentSaelzler / hyper-homelab

A foray into hyper-converged architecture.
GNU General Public License v3.0
0 stars 0 forks source link

change number of replicas to zero for new indices in elasticsearch #192

Closed VincentSaelzler closed 2 years ago

VincentSaelzler commented 2 years ago

we only currently have 1 node, so the status of elastic always shows as yellow

VincentSaelzler commented 2 years ago

need to send this via API

PUT _component_template/singlenode
{
  "template": {
    "settings": {
      "number_of_replicas": 4
    }
  }
}
VincentSaelzler commented 2 years ago

able to create the component template, but seems like manually adding to index template is the best option for now

  - name: Login to an API
    uri:
      url: http://localhost:9200/_component_template/single-node
      method: PUT
      body_format: json
      body: '{ "template": { "settings": { "number_of_replicas": 0 } } }'
VincentSaelzler commented 2 years ago

maybe don't use component indexes - just overwrite the value explicitly