I am trying to read .gz files in logstash input plugin but I can't read gunzip files in logstash. When I try to read those log files it throws error message like this,
A plugin had an unrecoverable error. Will restart this plugin. Plugin: ["/test.txt"], start_position=>"beginning", sincedb_path=>"/dev/null", codec=>"UTF-8">, stat_interval=>1, discover_interval=>15, sincedb_write_interval=>15, delimiter=>"\n">
Error: Object: sample.gz is not a legal argument to this wrapper, cause it doesn't respond to "read". {:level=>:error}
LogStash.conf file:
file {
path => "/test.txt" (this file contains list of gunzip files)
start_position => "beginning"
sincedb_path => "/dev/null"``
codec => "gzip_lines"
}
and also tried path => "/logfile.gz"
directly but both are not working it throws same error message.
How to solve this problem, please share your solutions. I refered all the similar questions but none of the solutions solve my issue.