Logstash input from another file

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.

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.

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?

Not that I know of.

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