# Logstash and multiple configurations

**URL:** <https://discuss.elastic.co/t/logstash-and-multiple-configurations/203029>\
**Category:** Logstash\
**Created:** [October 10, 2019, 1:02pm UTC](https://discuss.elastic.co/t/logstash-and-multiple-configurations/203029 "2019-10-10T13:02:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![beren](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@beren](https://discuss.elastic.co/u/beren)\
**Post date:** [October 10, 2019, 1:02pm UTC](https://discuss.elastic.co/t/logstash-and-multiple-configurations/203029/1 "2019-10-10T13:02:57Z")

</div>

Hi  
Theoretical question

How does logstash understand which logs to handle ? That is, we have configurations in the postfix folder.conf (for Postfix processing), Nginx (for nginx) they look like this .  
input {  
beats {  
type =\> "postfix/nginx"  
port =\> 5044  
}  
}

filter {  
if [type] == "postfix/nginx" {  
grok {  
match =\> { "message" =\> "Regxp1/Regexp2"" }  
}  
}  
}  
output {  
elasticsearch {  
type =\> "postfix/nginx"  
hosts =\> "localhost:9200"  
index =\> "postfix/nginx-%{+YYYY.MM.dd}"

How it will be defined that logs of postfix process Regexp 1, and logs of nginx Regexp2 ?

---

<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:** [November 7, 2019, 1:02pm UTC](https://discuss.elastic.co/t/logstash-and-multiple-configurations/203029/2 "2019-11-07T13:02:59Z")

</div>

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