# Multiple Index

**URL:** https://discuss.elastic.co/t/multiple-index/294012
**Category:** Beats
**Created:** [January 11, 2022, 10:00am UTC](https://discuss.elastic.co/t/multiple-index/294012 "2022-01-11T10:00:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![graimato](https://avatars.discourse-cdn.com/v4/letter/g/9e8a1a/32.png) [@graimato](https://discuss.elastic.co/u/graimato)
#### Post date: [January 11, 2022, 10:00am UTC](https://discuss.elastic.co/t/multiple-index/294012/1 "2022-01-11T10:00:53Z")

</div>

Dear all  
I have a problem with filebeat configuration. I enable two different module and I need to write log in two different index ,

- myindex-module1-data
- myindex-module2-data

Is it possible?

I read about filebeat.prospectors as follow but I want continue to use modules

```auto

filebeat.prospectors:

- type: log

  enabled: true
  paths:
    - /var/log/index1/*
  json.add_error_key: true
  json.message_key: log
  #json.keys_under_root: true

  pipeline: geoip

- type: log
  paths:
    - /usr/local/index2/*.log
  fields:
    type: "index2"
  fields_under_root: true

```

* * *

thanks for your time

---

<div class="post-metadata">

### Author: ![graimato](https://avatars.discourse-cdn.com/v4/letter/g/9e8a1a/32.png) [@graimato](https://discuss.elastic.co/u/graimato)
#### Post date: [January 11, 2022, 10:22am UTC](https://discuss.elastic.co/t/multiple-index/294012/2 "2022-01-11T10:22:10Z")

</div>

I found this post

> [@Enable 2 different filebeat modules & send to different index name](https://discuss.elastic.co/t/enable-2-different-filebeat-modules-send-to-different-index-name/187733/2):
>
> Hi, Does my comment [in this thread](https://discuss.elastic.co/t/hey-filebeat-inputs-reads-two-log-files-i-am-sending-it-to-elasticsearch-how-can-i-show-them-in-two-different-index-names-in-kibana/187841/2) help with what you're trying to achieve?

I'm trying

---

<div class="post-metadata">

### Author: ![graimato](https://avatars.discourse-cdn.com/v4/letter/g/9e8a1a/32.png) [@graimato](https://discuss.elastic.co/u/graimato)
#### Post date: [January 24, 2022, 12:43pm UTC](https://discuss.elastic.co/t/multiple-index/294012/3 "2022-01-24T12:43:13Z")

</div>

It works!

---

<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 21, 2022, 12:43pm UTC](https://discuss.elastic.co/t/multiple-index/294012/4 "2022-02-21T12:43:55Z")

</div>

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