HTTP request failure on using the logstash-filter-http

I'm using http filter to fetch some json data from a server. Below is my conf file

input {
    file {
       path => "/opt/data/dum.txt"
       start_position => "beginning"
     }
}
filter {
   http {
       url => "http://jsonplaceholder.typicode.com/users"
       verb => GET
    }
}
output {
     stdout {
         codec => rubydebug
      }
}

I use a docker container for logstash. I'm able to curl the request successfully in the container. I'm getting the following error in logstash:

error during HTTP request {:url=>"http://jsonplaceholder.typicode.com/users", :body=>nil, :client_error=>"jsonplaceholder.typicode.com"}

Can you help me solve this?

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