# Unable to use 2 fie log and 2 different index for them

**URL:** <https://discuss.elastic.co/t/unable-to-use-2-fie-log-and-2-different-index-for-them/323563>\
**Category:** Elasticsearch\
**Created:** [January 20, 2023, 5:39am UTC](https://discuss.elastic.co/t/unable-to-use-2-fie-log-and-2-different-index-for-them/323563 "2023-01-20T05:39:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devdev7711](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@devdev7711](https://discuss.elastic.co/u/devdev7711)\
**Post date:** [January 20, 2023, 5:39am UTC](https://discuss.elastic.co/t/unable-to-use-2-fie-log-and-2-different-index-for-them/323563/1 "2023-01-20T05:39:21Z")

</div>

below is my filebeat it is working fine for 1 log location and 1 index but i want to use 2 file log location and 2 diifferent index 1 index for 1 log path. how can we do this

filebeat.inputs:

- type: log

filebeat.config.modules:

path: ${path.config}/modules.d/\*.yml

reload.enabled: true

setup.template.settings:  
index.number\_of\_shards: 1

setup.template.name: "filebeat-_"  
setup.template.overwrite: true  
setup.template.pattern: "filebeat-_"  
setup.template.settings:

setup.kibana:

host: ["[http://10.111.32.150:5600](http://10.111.32.150:5600)"]

output.elasticsearch:

hosts: ["[http://10.111.32.150:9300](http://10.111.32.150:9300)"]

index: "filebeat-\*"

processors:

- add\_cloud\_metadata: ~
- add\_docker\_metadata: ~
- add\_kubernetes\_metadata: ~

---

<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:** [February 17, 2023, 5:39am UTC](https://discuss.elastic.co/t/unable-to-use-2-fie-log-and-2-different-index-for-them/323563/2 "2023-02-17T05:39:48Z")

</div>

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