# Filebeat, different indices from different CSV

**URL:** <https://discuss.elastic.co/t/filebeat-different-indices-from-different-csv/292724>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 22, 2021, 5:18pm UTC](https://discuss.elastic.co/t/filebeat-different-indices-from-different-csv/292724 "2021-12-22T17:18:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![giron](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giron/32/98095_2.png) [@giron](https://discuss.elastic.co/u/giron)\
**Post date:** [December 22, 2021, 5:18pm UTC](https://discuss.elastic.co/t/filebeat-different-indices-from-different-csv/292724/1 "2021-12-22T17:18:11Z")

</div>

Hi all,  
I need your help to understand where or what is wrong. I need to read different file csv (for now 4 csv) and write the data in 4 indexs on elastic using Filebeat.

This configuration with 2 CSV, 2 indexs and 2 pipeline is ok and it works...i can find the new indexs on elastic.

```auto
filebeat.inputs:
	- type: log
	  enabled: true
	  close_eof: true
	  paths:
		- C:\AAAA_*.csv
	  fields:
		A: "si"
		B: "no"
	- type: log
	  enabled: true
	  close_eof: true
	  paths:
		- C:\BBBB_*.csv
	  fields:
		A: "no"
		B: "si"

output.elasticsearch:
  hosts: ["localhost:9200"]

  index: "A-%{+YYYY.MM.dd.HH.mm}"
  pipeline: "A"
  
  indices:
    - index: "B-%{+YYYY.MM.dd.HH.mm}"
      when.equals:
        fields.B: "si"
        
  pipelines:
    - pipeline: "B"
      when.equals:
        fields.B: "si"  

setup.ilm.enabled: false
setup.template.enabled: false

```

Now i want to add another csv and so, a new index and a new pipeline, this is my new filebeat.yml but i can't find the new index...where is the problem?

```auto
filebeat.inputs:
- type: log
  enabled: true
  close_eof: true
  paths:
    - C:\AAAA_*.csv
  fields:
    A: "si"
    B: "no"
    C: "no"
- type: log
  enabled: true
  close_eof: true
  paths:
    - C:\BBBB_*.csv
  fields:
    A: "no"
    B: "si"
    C: "no"
- type: log
  enabled: true
  close_eof: true
  paths:
    - C:\CCCC_*.csv
  fields:
    A: "no"
    B: "no"
    C: "si"

output.elasticsearch:
  hosts: ["localhost:9200"]

  index: "A-%{+YYYY.MM.dd.HH.mm}"
  pipeline: "A"
  
  indices:
    - index: "B-%{+YYYY.MM.dd.HH.mm}"
      when.equals:
        fields.B: "si"
    - index: "C-%{+YYYY.MM.dd.HH.mm}"
      when.equals:
        fields.C: "si"
        
  pipelines:
    - pipeline: "B"
      when.equals:
        fields.B: "si"
    - pipeline: "C"
      when.equals:
        fields.C: "si"    

setup.ilm.enabled: false
setup.template.enabled: false

```

---

<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:** [December 23, 2021, 10:29am UTC](https://discuss.elastic.co/t/filebeat-different-indices-from-different-csv/292724/2 "2021-12-23T10:29:28Z")

</div>

Hey, did you try running the filebeat in debug mode and see if there are any errors reported?

---

<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:** [January 20, 2022, 12:29pm UTC](https://discuss.elastic.co/t/filebeat-different-indices-from-different-csv/292724/3 "2022-01-20T12:29:49Z")

</div>

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