# Logstash input from another file

**URL:** <https://discuss.elastic.co/t/logstash-input-from-another-file/127576>\
**Category:** Logstash\
**Created:** [April 11, 2018, 6:18am UTC](https://discuss.elastic.co/t/logstash-input-from-another-file/127576 "2018-04-11T06:18:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![temp\_expt](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@temp\_expt](https://discuss.elastic.co/u/temp_expt)\
**Post date:** [April 11, 2018, 6:18am UTC](https://discuss.elastic.co/t/logstash-input-from-another-file/127576/1 "2018-04-11T06:18:18Z")

</div>

Hello,  
This is the SAMPLE config file that I'm using.

```
input {
	file {
			path => "/my/path/*/logfile.log"
			start_position => beginning
			ignore_older => 0
			sincedb_path => "/my/sincedb/path/demo.db"
			codec => plain { charset => "UTF-8" }
	}
}
filter {
	if "xyz" in [message]
	{
		mutate
		{ add_tag => ["TAG_ADDED"] }
	}
	grok
	{
		match => { "path" => "/my/path/%{WORD:cluster}/%{DATA}" }
		overwrite => ["cluster"]
	}
}
output {
	file {
			path => "/my/output/path/demo.txt"
	}
	stdout { codec => rubydebug { metadata => true } }
	}

```

But, instead of using `path => "/my/path/*/logfile.log"`  
I want to use text file (say, abc.txt).  
and this text file (abc.txt) will contain a list of log file paths like below

path1/abc/a.log  
path2/def/b.log  
path3/ghi/c.log  
...  
....  
etc.

How can I do that, please help.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 11, 2018, 6:31am UTC](https://discuss.elastic.co/t/logstash-input-from-another-file/127576/2 "2018-04-11T06:31:28Z")

</div>

The file input doesn't support loading the input paths from a file. They must be listed directly in the configuration file. I suggest you generate your configuration file, possibly using a configuration management tool like Ansible.

---

<div class="post-metadata">

**Author:** ![temp\_expt](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@temp\_expt](https://discuss.elastic.co/u/temp_expt)\
**Post date:** [April 11, 2018, 6:43am UTC](https://discuss.elastic.co/t/logstash-input-from-another-file/127576/3 "2018-04-11T06:43:48Z")

</div>

Ok, Thank you for your quick response. Just to check with you, is there any plugin available for INPUT which can help me to do that apart from using Ansible?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 11, 2018, 7:27am UTC](https://discuss.elastic.co/t/logstash-input-from-another-file/127576/4 "2018-04-11T07:27:48Z")

</div>

Not that I know of.

---

<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:** [May 9, 2018, 7:28am UTC](https://discuss.elastic.co/t/logstash-input-from-another-file/127576/5 "2018-05-09T07:28:12Z")

</div>

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