# Multiple filebeat config files

**URL:** <https://discuss.elastic.co/t/multiple-filebeat-config-files/291769>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 14, 2021, 9:47am UTC](https://discuss.elastic.co/t/multiple-filebeat-config-files/291769 "2021-12-14T09:47:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mangeshs](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@mangeshs](https://discuss.elastic.co/u/mangeshs)\
**Post date:** [December 14, 2021, 9:47am UTC](https://discuss.elastic.co/t/multiple-filebeat-config-files/291769/1 "2021-12-14T09:47:23Z")

</div>

I have two different logs format at input so I want to use multiple filebeat yml files and those pointing out to different logstash port  
my logstash configuration is based on these inputs

```auto

filebeat1.yml
	filebeat.inputs:
		- type: log
		enabled: true
		paths:
			- firstPath\*.log
		file_identity.inode_marker.path: /logs/.filebeat-marker
	multiline.pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
	multiline.negate: true
	multiline.match: after
	output.logstash:
	hosts: ["localhost:5044"]

filebeat1.yml
	filebeat.inputs:
		- type: log
		enabled: true
		paths:
			- secondPath\*.log
		file_identity.inode_marker.path: /logs/.filebeat-marker
	output.logstash:
	hosts: ["localhost:5045"]

Logstash
input{
	beats {
		port => 5044
		type => "increament_events"
		add_field => { "[@metadata][no_show]" => "elasticsearch_and_solr_id" }
	}
	beats {
		port => 5045
		type => "search_events"
		add_field => { "[@metadata][no_show]" => "elasticsearch_and_solr_id" }
	}
}

```

and filebeat configuration I tried but not got where to write that code

```auto
filebeat.config_dir: ${path.config}/conf/

```

---

<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 11, 2022, 11:47am UTC](https://discuss.elastic.co/t/multiple-filebeat-config-files/291769/2 "2022-01-11T11:47:46Z")

</div>

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