# How can i configure a new data path for another instance of filebeat?

**URL:** <https://discuss.elastic.co/t/how-can-i-configure-a-new-data-path-for-another-instance-of-filebeat/361045>\
**Category:** Beats\
**Created:** [June 7, 2024, 2:50pm UTC](https://discuss.elastic.co/t/how-can-i-configure-a-new-data-path-for-another-instance-of-filebeat/361045 "2024-06-07T14:50:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Misa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/misa/32/133822_2.png) [@Misa](https://discuss.elastic.co/u/Misa)\
**Post date:** [June 7, 2024, 2:50pm UTC](https://discuss.elastic.co/t/how-can-i-configure-a-new-data-path-for-another-instance-of-filebeat/361045/1 "2024-06-07T14:50:11Z")

</div>

I used this doc to configure a new instance of filebeat: [Configuring Multi-Instances of Beats on a Single Server](https://medium.com/@yago82/configuring-multi-instances-of-beats-on-a-single-server-8080a10a9629).

But the new filebeat doesnt create files in new " Directories for Data and Logs". Journalctl shows " Exiting: /var/lib/filebeat/filebeat.lock: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data)"

what i need to do to filebeat send to the directory /var/lib/filebeat\_02?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 8, 2024, 7:47pm UTC](https://discuss.elastic.co/t/how-can-i-configure-a-new-data-path-for-another-instance-of-filebeat/361045/2 "2024-06-08T19:47:23Z")

</div>

Problem with 3rd party articles the can leave out key steps...

You need to set all the correct project paths in the filebeat.yml or add them as command line parameters in your service file.

> **[Configure project paths | Filebeat Reference \[8.14\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-path.html)**

Curious why you want to run 2 instances

---

<div class="post-metadata">

**Author:** ![Florian\_Lehner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/florian_lehner/32/97221_2.png) [@Florian\_Lehner](https://discuss.elastic.co/u/Florian_Lehner)\
**Post date:** [June 11, 2024, 5:52am UTC](https://discuss.elastic.co/t/how-can-i-configure-a-new-data-path-for-another-instance-of-filebeat/361045/3 "2024-06-11T05:52:54Z")

</div>

I have removed the `Profiling` tag from this post, as it is not about [Elastic Universal Profiling](https://www.elastic.co/observability/universal-profiling).

---

<div class="post-metadata">

**Author:** ![Misa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/misa/32/133822_2.png) [@Misa](https://discuss.elastic.co/u/Misa)\
**Post date:** [June 11, 2024, 2:16pm UTC](https://discuss.elastic.co/t/how-can-i-configure-a-new-data-path-for-another-instance-of-filebeat/361045/4 "2024-06-11T14:16:59Z")

</div>

All that was missing was the "path" within the service that points to the "log and lib" data files.

About your curiosity: the logs I receive are personalized. And using the ML tool it generates different multiline patterns. That's why it was necessary to have two filebeats on the same machine.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 12, 2024, 4:42am UTC](https://discuss.elastic.co/t/how-can-i-configure-a-new-data-path-for-another-instance-of-filebeat/361045/5 "2024-06-12T04:42:15Z")

</div>

> [@Misa](#):
>
> About your curiosity: the logs I receive are personalized. And using the ML tool it generates different multiline patterns.

I am sure I don't understand because you certainly can do that with a single filebeat with multiple inputs / indices / pipelines ...

But glad it's working...

---

<div class="post-metadata">

**Author:** ![Misa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/misa/32/133822_2.png) [@Misa](https://discuss.elastic.co/u/Misa)\
**Post date:** [June 12, 2024, 12:18pm UTC](https://discuss.elastic.co/t/how-can-i-configure-a-new-data-path-for-another-instance-of-filebeat/361045/6 "2024-06-12T12:18:56Z")

</div>

using multiple inputs / indices / pipelines doesn't work always for me. i don't now why.
