Capture response from HTTP requests using HTTP Output Plugin in Logstash

Hello, I could not figure out a way to capture the response by issuing a HTTP request to a target endpoint using the HTTP Output plugin. I just want to get the status code displayed (200 OK / 404 Not Found) on the console or wherever it can. Please help. :slightly_smiling:

Could you share your config? It would help.

Ben

is it possible to output to HTTP if the status code is 200; if it's non-200 output to another channel, e.g. a file or redis queue?

our config looks like this:

output {
  stdout { codec => rubydebug }
  http {
    url => "http://x.x.x.x:8080/some/api"
    http_method => "put"
    content_type =>"application/json"

    headers => ["Application", "application/json"]
    #codec => "json"
    format => "json"
  }
}