# Multi-tenancy's indices configuration

**URL:** <https://forum.opensearch.org/t/multi-tenancys-indices-configuration/16956>\
**Category:** Security\
**Tags:** configure\
**Created:** [December 5, 2023, 1:41pm UTC](https://forum.opensearch.org/t/multi-tenancys-indices-configuration/16956 "2023-12-05T13:41:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [December 5, 2023, 1:41pm UTC](https://forum.opensearch.org/t/multi-tenancys-indices-configuration/16956/1 "2023-12-05T13:41:27Z")

</div>

\*\*On behalf of a user of [Slack] [https://opensearch.slack.com/archives/C051Y637FKK/p1701670442430609](https://opensearch.slack.com/archives/C051Y637FKK/p1701670442430609) \*\*

“Hey, we have enabled multi-tenancy in opensearch and we are serving hundreds of users. We have noticed that each user get’s their own .kibana index, it looks like this: `.kibana_1443911157_cnvictornilssonousomethingsomethingsomethingsomething_1.`  
Each index has 1 primary and 1 replica, which creates more than 200 shards. Surely this must be wrong? How can we stop this?”

---

<div class="post-metadata">

**Author:** ![\_uj](https://avatars.discourse-cdn.com/v4/letter/_/47e85d/32.png) [@\_uj](https://forum.opensearch.org/u/_uj)\
**Post date:** [December 5, 2023, 2:47pm UTC](https://forum.opensearch.org/t/multi-tenancys-indices-configuration/16956/2 "2023-12-05T14:47:43Z")

</div>

Hello,  
that’s a problem we have on our cluster.  
Since this architectural choice leads to micro-sharding and resource waste, we relegated those .kibana indices to certain cluster nodes on a different data tier (cool tier).

Deactivating the private spaces would be another solution:

In `opensearch_dashboards.yml`

```auto
opensearch_security.multitenancy.tenants.enable_private: false

```

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [December 5, 2023, 4:07pm UTC](https://forum.opensearch.org/t/multi-tenancys-indices-configuration/16956/3 "2023-12-05T16:07:48Z")

</div>

Hi,

When multi-tenancy is enabled, indices are created for each tenant (i.e. Global, Private[0-x], Tenant-X, Tenant-Y, etc…).  
In the case the private tenant is enabled ( `"private_tenant_enabled": true` ) you will see an index starting .kibana\* being created for each user.

According to the index template:

```auto
.
.
"template": {
    "settings": {
      "index.number_of_shards": "1"
    },
.
.

```

@ **Victor Nilsson** Is there a reason to enable privet tenant (enabled by default) in your OpenSearch cluster?

Please note: all objects saved in the private tenant will no longer be available if private tenants are disabled, however, when private tenants are reenabled all previously saved objects are preserved and made available.

For more details on multi-tenancy configuration please see here: [Dynamic configuration in OpenSearch Dashboards - OpenSearch documentation](https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/)

Best,  
Mantas
