# Using Elasticsearch for storing logs in microservice-based architecture

**URL:** <https://discuss.elastic.co/t/using-elasticsearch-for-storing-logs-in-microservice-based-architecture/289288>\
**Category:** Elasticsearch\
**Created:** [November 16, 2021, 9:29am UTC](https://discuss.elastic.co/t/using-elasticsearch-for-storing-logs-in-microservice-based-architecture/289288 "2021-11-16T09:29:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleksii88](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oleksii88/32/97163_2.png) [@Oleksii88](https://discuss.elastic.co/u/Oleksii88)\
**Post date:** [November 16, 2021, 9:29am UTC](https://discuss.elastic.co/t/using-elasticsearch-for-storing-logs-in-microservice-based-architecture/289288/1 "2021-11-16T09:29:52Z")

</div>

Hi,

I am writing a new microservice-based system and considering Elasticsearch for logging data storage.

What are the best practices of using ElastiSearch for logging? For now, I have 2 questions? but if anybody has ideas to share, please do not hesitate 🙂

- One index for all microservices or a dedicated index for each one?
- How will customers share logs if they are not willing to provide us with the Elasticsearch creds with read-only permissions due to security considerations? What option do I have? Exporting data from index(-ies) using `GET /my-index-000001/_search`.

Thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 16, 2021, 10:30pm UTC](https://discuss.elastic.co/t/using-elasticsearch-for-storing-logs-in-microservice-based-architecture/289288/2 "2021-11-16T22:30:48Z")

</div>

Welcome to our community! 😃

> [@Oleksii88](#):
>
> - One index for all microservices or a dedicated index for each one?

I'd group the same services across multiple hosts into their own indices.

> [@Oleksii88](#):
>
> How will customers share logs if they are not willing to provide us with the Elasticsearch creds with read-only permissions due to security considerations?

If they don't want to give you read only access, why would they share the logs with you at all?

---

<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:** [December 14, 2021, 10:31pm UTC](https://discuss.elastic.co/t/using-elasticsearch-for-storing-logs-in-microservice-based-architecture/289288/3 "2021-12-14T22:31:34Z")

</div>

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