# Update indices replica set in Elasticsearch cluster

**URL:** https://discuss.elastic.co/t/update-indices-replica-set-in-elasticsearch-cluster/341149
**Category:** Elasticsearch
**Created:** [August 19, 2023, 1:09pm UTC](https://discuss.elastic.co/t/update-indices-replica-set-in-elasticsearch-cluster/341149 "2023-08-19T13:09:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ahmed.emad](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@ahmed.emad](https://discuss.elastic.co/u/ahmed.emad)
#### Post date: [August 19, 2023, 1:09pm UTC](https://discuss.elastic.co/t/update-indices-replica-set-in-elasticsearch-cluster/341149/1 "2023-08-19T13:09:11Z")

</div>

Hello,

I would like to update the number of replicas for newly creating indices to be 5 automatically, so i used the below curl

```auto
curl -XPUT -k -u elastic:password 'https://192.168.x.x:9200/_index_template/my_template' -H 'Content-Type: application/json' -d '{
  "index_patterns": ["*"],
  "template": {
    "settings": {
      "number_of_replicas": 5
    }
  }
}'

```

it is working fine when running it on a cluster working over HTTP but when running to a cluster working over HTTPS i keep getting the below error

```auto
{
   "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "index template [my_template] has index patterns [*] matching patterns from existing templates [.monitoring-beats-mb,.monitoring-ent-search-mb,.monitoring-es-mb,.monitoring-kibana-mb,.monitoring-logstash-mb] with patterns (.monitoring-beats-mb => [.monitoring-beats-8-*],.monitoring-ent-search-mb => [.monitoring-ent-search-8-*],.monitoring-es-mb => [.monitoring-es-8-*],.monitoring-kibana-mb => [.monitoring-kibana-8-*],.monitoring-logstash-mb => [.monitoring-logstash-8-*]) that have the same priority [0], multiple index templates may not match during index creation, please use a different priority"
            }
        ],
            },
    "status": 400
}

```

so if there any help?

---

<div class="post-metadata">

### Author: ![ahmed.emad](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@ahmed.emad](https://discuss.elastic.co/u/ahmed.emad)
#### Post date: [August 21, 2023, 10:32pm UTC](https://discuss.elastic.co/t/update-indices-replica-set-in-elasticsearch-cluster/341149/2 "2023-08-21T22:32:59Z")

</div>

any support, please? thanks in advance

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 18, 2023, 10:33pm UTC](https://discuss.elastic.co/t/update-indices-replica-set-in-elasticsearch-cluster/341149/3 "2023-09-18T22:33:46Z")

</div>

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