How to read gzip encoding from log file

So I am using logstash to push data to elasticsearch. For backup we are writing the same logs into a file databakup.log. For this we are using gzip true as below:
file {
path => "/home/ubuntu/logstash-filelogs/logstash-%{+YYYY-MM-dd}.log"
gzip => true
Now I want to read this file in case of elasticsearch goes down. The problem I am facing is that the file input doesn't recognise the format. Below is my config
file {
path => "/home/ubuntu/logstash-filelogs/*"
start_position => "beginning"
codec => gzip_lines
type => "gzip"
mode => "read"

Can you please help me understand what I am missing here?

What errors do you get?

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