# File sharing between multiple logstash instance

**URL:** https://discuss.elastic.co/t/file-sharing-between-multiple-logstash-instance/349445
**Category:** Logstash
**Created:** [December 15, 2023, 10:33am UTC](https://discuss.elastic.co/t/file-sharing-between-multiple-logstash-instance/349445 "2023-12-15T10:33:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kishan\_vadalia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kishan_vadalia/32/130046_2.png) [@kishan\_vadalia](https://discuss.elastic.co/u/kishan_vadalia)
#### Post date: [December 15, 2023, 10:33am UTC](https://discuss.elastic.co/t/file-sharing-between-multiple-logstash-instance/349445/1 "2023-12-15T10:33:43Z")

</div>

I have 3 logstash instance running on same machine and putting data to same ES index. all 3 are reading file input from same location (/etc/logstash/conf.d). If there are 500 files in that location than on ES index number of hits comes more than 500(happens due to same file got read by more than 1 instance~duplicate data on ES index). How I make sure that those 3 logstash instances share the files while reading and single file is read by just one instance?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [December 15, 2023, 2:49pm UTC](https://discuss.elastic.co/t/file-sharing-between-multiple-logstash-instance/349445/2 "2023-12-15T14:49:47Z")

</div>

Hello and welcome,

Can you provide a little more context?

> [@kishan\_vadalia](#):
>
> I have 3 logstash instance running on same machine and putting data to same ES index.

First, why are running 3 instances of logstash on the same machine and how are you running them? Please share the command line you are using.

> [@kishan\_vadalia](#):
>
> all 3 are reading file input from same location (/etc/logstash/conf.d). If there are 500 files in that location than on ES index number of hits comes more than 500(happens due to same file got read by more than 1 instance~duplicate data on ES index).

What do you mean with that? What fiels do you have in `/etc/logstash/conf.d`? log files or configuration files? This path should have only **configuration** files, it should not have log files as this could lead to confusion.

> [@kishan\_vadalia](#):
>
> How I make sure that those 3 logstash instances share the files while reading and single file is read by just one instance?

You need to share your configurations.

---

<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: [January 12, 2024, 2:49pm UTC](https://discuss.elastic.co/t/file-sharing-between-multiple-logstash-instance/349445/3 "2024-01-12T14:49:58Z")

</div>

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