# Change security-auditlog-\* index replicas

**URL:** <https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799>\
**Category:** Security\
**Created:** [October 31, 2019, 4:14pm UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799 "2019-10-31T16:14:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfonsorbj](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@alfonsorbj](https://forum.opensearch.org/u/alfonsorbj)\
**Post date:** [October 31, 2019, 4:14pm UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799/1 "2019-10-31T16:14:30Z")

</div>

Hello everyone!!

When creating a single Open Distro node, I can see the following index:

`yellow open security-auditlog-2019.10.31 N0lY70jLTGqD26HZnUb04A 1 1 29 0 46.7kb 46.7kb`

As you can see, the index has a replica and having a single node the state of the cluster is always yellow.

If I set the replicas to 0 the problem is fixed, until the next day, when the new daily index is created with a replica.

How can I make all security-auditlog indices are created with 0 replicas?

I haven’t found any template or setting that indicates it.

Thank you very much in advance.

Best regards,

Alfonso

---

<div class="post-metadata">

**Author:** ![alfonsorbj](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@alfonsorbj](https://forum.opensearch.org/u/alfonsorbj)\
**Post date:** [November 5, 2019, 11:45am UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799/2 "2019-11-05T11:45:37Z")

</div>

Hello everyone!!

I’d like to know if what I’m trying to do is possible. I would like to have a single node environment but the replication of these indices alters the state of the cluster.

Thank you in advance!

Alfonso

---

<div class="post-metadata">

**Author:** ![ogulman](https://avatars.discourse-cdn.com/v4/letter/o/9fc29f/32.png) [@ogulman](https://forum.opensearch.org/u/ogulman)\
**Post date:** [December 3, 2019, 5:05pm UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799/3 "2019-12-03T17:05:01Z")

</div>

Same question. thanks for any help in advance.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/cac3f2169f8423afee13e5f7eb8a3b478ab674ed.png)

---

<div class="post-metadata">

**Author:** ![ogulman](https://avatars.discourse-cdn.com/v4/letter/o/9fc29f/32.png) [@ogulman](https://forum.opensearch.org/u/ogulman)\
**Post date:** [April 14, 2020, 4:49pm UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799/4 "2020-04-14T16:49:30Z")

</div>

> [@alfonsorbj](#):
>
> I haven’t found any template or setting that indicates it.

[https://github.com/opendistro-for-elasticsearch/security-kibana-plugin/issues/164](https://github.com/opendistro-for-elasticsearch/security-kibana-plugin/issues/164)

---

<div class="post-metadata">

**Author:** ![xuann](https://avatars.discourse-cdn.com/v4/letter/x/c5a1d2/32.png) [@xuann](https://forum.opensearch.org/u/xuann)\
**Post date:** [October 27, 2020, 4:53pm UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799/5 "2020-10-27T16:53:35Z")

</div>

in the same issue…  
I was trying to solve it using something like this in the elasticsearch.yml:

```auto
opendistro_security.audit.type: internal_elasticsearch
opendistro_security.audit.config.index: "'auditlog-'YYYY.MM.dd"
opendistro_security.audit.config.index.number_of_shards: 1
opendistro_security.audit.config.index.number_of_replicas: 0

```

unsuccesful!

Any idea about how to solve it?

Best regards

---

<div class="post-metadata">

**Author:** ![xuann](https://avatars.discourse-cdn.com/v4/letter/x/c5a1d2/32.png) [@xuann](https://forum.opensearch.org/u/xuann)\
**Post date:** [February 13, 2021, 5:27pm UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799/6 "2021-02-13T17:27:41Z")

</div>

well. finally I solved it just using the console

```auto
PUT /my_index/_settings
{
  "index" : {
    "number_of_replicas" : 0
  }
}

```

And the `.opendistro_security` index remains in that way, because it is a only one index…

---

<div class="post-metadata">

**Author:** ![Anthony](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/anthony/32/9939_2.png) [@Anthony](https://forum.opensearch.org/u/Anthony)\
**Post date:** [February 18, 2021, 3:01pm UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799/7 "2021-02-18T15:01:42Z")

</div>

@alfonsorbj I’m not sure I understand the issue, did you try to create a template to be used for audit index like so:

```
PUT _template/template_1
{
    "index_patterns": ["audit*"],
     "settings": {
           "number_of_replicas": 0
    }
}

```

---

<div class="post-metadata">

**Author:** ![BlackMetalz](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@BlackMetalz](https://forum.opensearch.org/u/BlackMetalz)\
**Post date:** [February 23, 2021, 10:43am UTC](https://forum.opensearch.org/t/change-security-auditlog-index-replicas/1799/8 "2021-02-23T10:43:09Z")

</div>

Thanks, with this I’m able to set security-audit log to monthly log
