# Create Separate index for each logfile

**URL:** <https://discuss.elastic.co/t/create-separate-index-for-each-logfile/371493>\
**Category:** Elasticsearch\
**Created:** [December 4, 2024, 11:50pm UTC](https://discuss.elastic.co/t/create-separate-index-for-each-logfile/371493 "2024-12-04T23:50:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitesh.srivastava](https://avatars.discourse-cdn.com/v4/letter/n/278dde/32.png) [@nitesh.srivastava](https://discuss.elastic.co/u/nitesh.srivastava)\
**Post date:** [December 4, 2024, 11:50pm UTC](https://discuss.elastic.co/t/create-separate-index-for-each-logfile/371493/1 "2024-12-04T23:50:39Z")

</div>

Hello ppl,

I have a Filebeat \> Logstash \> Elasticsearch set up in my environment where we are collecting logs data by installing Filebeat and forwarding the data via logstash input. However, we have a peculiar situation where we have 3 different apps with 3 different logs hosted on the same server.  
I have configured the Filebeat.yml to send logs from these 3 logs under the filebeat.inputs field.  
My question is, is it possible to create separate indexes for each of these logs in Elastic?  
I tried some of the below settings in the logstash input pipeline but it didnt work and I keep getting an error when I start logstash.

## input plugin:

input {  
beats {  
port =\> 5058  
path =\> "H:\LogFiles\ABC\abc.log"  
tags =\> "ABC"  
tags =\> "hostname"  
}  
beats {  
port =\> 5058  
path =\> "H:\LogFiles\PQR\pqr.log"  
tags =\> "PQR"  
tags =\> "hostname"  
}  
beats {  
port =\> 5058  
path =\> "H:\LogFiles\XYZ\xyz.log\*"  
tags =\> "XYZ"  
tags =\> "hostname"  
}  
}

And, here's my filebeat.input setting in the yml file:

# ============================== Filebeat inputs ===============================

filebeat.inputs:

- type: filestream  
enabled: true  
id: abc  
paths:

- type: filestream  
enabled: true  
id: pqr  
paths:

- type: filestream  
enabled: true  
id: xyz  
paths:

=======================================

Thanks,  
Nitesh
