I am using the below conf for Logstash HTTP input plugin: I am trying to send .gz file and in header passing Content-Encoding: gzip. It is successfully doing its job but I am interested only in text format inside the gzip and not any other format. How to modify that it should accept only those .gz file which contains text format and not any other format like images/movie/pdf etc.
input {
http {
host => "0.0.0.0"
port => 8443
max_pending_requests => 500
ssl => "false"
ssl_verify_mode => "none"
threads => "20"
}
}
output {
file {
path => "../../logstash-client-logs/%{[headers][application_name]}/myapplication-logstash-client-%{+yyyy-MM-dd}.log"
codec => line { format => "%{[message]}"}
}
}