# Filebeat with multiple path and index

**URL:** <https://discuss.elastic.co/t/filebeat-with-multiple-path-and-index/356487>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 30, 2024, 11:46am UTC](https://discuss.elastic.co/t/filebeat-with-multiple-path-and-index/356487 "2024-03-30T11:46:25Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [April 8, 2024, 2:27am UTC](https://discuss.elastic.co/t/filebeat-with-multiple-path-and-index/356487/7 "2024-04-08T02:27:35Z")

</div>

BTW you can also do this sending direct from Filebeat to Elasticsearch and you will still get all the benefits above that I mentioned.

```auto
filebeat.inputs:
- type: filestream
  id: my-filestream-id
  enabled: true
  paths:
    - /var/log/*.log
  fields_under_root: true
  fields:
    data_stream.type: logs
    data_stream.dataset: system_log
    data_stream.namespace: default

setup.ilm.enabled: false
setup.template.enabled: false
# setup.template.settings:
# index.number_of_shards: 1

setup.kibana:

output.elasticsearch:
  hosts: ["http://localhost:9200"]
  index: "%{[data_stream.type]}-%{[data_stream.dataset]}-%{[data_stream.namespace]}"

```

---

_[View the full topic](https://discuss.elastic.co/t/filebeat-with-multiple-path-and-index/356487)._
