# Multiple Filebeat logs path configuration stops the filebeat

**URL:** <https://discuss.elastic.co/t/multiple-filebeat-logs-path-configuration-stops-the-filebeat/300471>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 23, 2022, 2:30pm UTC](https://discuss.elastic.co/t/multiple-filebeat-logs-path-configuration-stops-the-filebeat/300471 "2022-03-23T14:30:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)\
**Post date:** [March 23, 2022, 2:30pm UTC](https://discuss.elastic.co/t/multiple-filebeat-logs-path-configuration-stops-the-filebeat/300471/1 "2022-03-23T14:30:04Z")

</div>

Hello All,

1)After I'm configuring multiple filebeat path in filebeat.yml,filebeat gets stopped with below error:

Exiting: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data).

* * *

filebeat.inputs:

- type: log  
enabled: true  
paths:
  - /l/logs/CIS/\*\*/\*.log

  - /l/pool/CIS/requests/\*/log/.\*log

* * *

For single path configured such issue is not faced.what might be the issue?

1. Is it also possible I can define env variable for path,something like below,what would be right approach?

paths:  
-${KPDM\_SHARED}/MIS/requests/\*\*/log/\*.log

* * *

Filebeat.yml

filebeat.inputs:

- type: log  
enabled: true  
paths:
  - /l/logs/MIS/\*\*/_.log_
  - /l/pool/CIS/requests/log/\*.log  
ignore\_older: 1h  
include\_lines:
  - \[1\]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z ?(._)  
multiline.type: pattern  
multiline.pattern: \[2\]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z  
multiline.negate: true  
multiline.match: after  
scan\_frequency: 30s  
harvester\_limit: 100  
close\_inactive: 30m  
close\_removed: true  
clean\_removed: true  
filebeat.config.modules:  
path: ${path.config}/modules.d/_.yml  
reload.enabled: false  
setup.ilm.enabled: true  
setup.ilm.check\_exists: true  
setup.ilm.rollover\_alias: cis-log  
setup.ilm.pattern: '{now/d}-000001'  
setup.ilm.overwrite: false  
setup.kibana:  
host: [http://ctd06appl0012.dev.m01.group.g:5600](http://ctd06appl0012.dev.m01.group.g:5600)  
output.Elasticsearch:  
hosts:
  - [http://ctd06appl0013.dev.m01.group.g:9400](http://ctd06appl0013.dev.m01.group.g:9400)  
processors:

- add\_host\_metadata: null
- drop\_fields:  
when:  
equals:  
agent.type: filebeat  
fields:
  - agent.hostname
  - agent.id
  - agent.type
  - agent.ephemeral\_id
  - agent.version
  - log.offset
  - log.flags
  - input.type
  - ecs.version
  - host.os
  - host.id
  - host.mac
  - host.architecture  
monitoring.enabled: true  
monitoring.Elasticsearch: null

* * *

start filebeat:

#!/bin/ksh  
echo "Starting filebeat..."  
./filebeat &  
\_pid=$!  
echo "$\_pid" \> filebeat.pid  
echo "Pid $\_pid stored in filebeat.pid"

* * *

1. 0-9 

2. 0-9

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [March 24, 2022, 2:42pm UTC](https://discuss.elastic.co/t/multiple-filebeat-logs-path-configuration-stops-the-filebeat/300471/2 "2022-03-24T14:42:39Z")

</div>

Hi! Could you please reformat your post using `code tags`? It's hard to read it or spot errors now.

---

<div class="post-metadata">

**Author:** ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)\
**Post date:** [March 24, 2022, 5:35pm UTC](https://discuss.elastic.co/t/multiple-filebeat-logs-path-configuration-stops-the-filebeat/300471/3 "2022-03-24T17:35:54Z")

</div>

@mtojek Thanx for looking into it!

The issue is solved now.

* * *

```auto
filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /l/logs/MIS/**/*.log
    - ${KPTI_SHARED}/MIS/requests/*/log/*.log

```

Still I'm Not sure why below error keeps on coming in terminal and filebeat stops:

Exiting: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data)

---

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [March 24, 2022, 5:54pm UTC](https://discuss.elastic.co/t/multiple-filebeat-logs-path-configuration-stops-the-filebeat/300471/4 "2022-03-24T17:54:51Z")

</div>

It looks to me that both paths intersect.. so you are not harvesting files from two purely separate locations

```auto

/MIS/**/*.log
/MIS/requests/

```

---

<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:** [April 21, 2022, 7:55pm UTC](https://discuss.elastic.co/t/multiple-filebeat-logs-path-configuration-stops-the-filebeat/300471/5 "2022-04-21T19:55:35Z")

</div>

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