Need help with a 2XX HTTP code 400 Error

I am receiving the [ERROR][logstash.outputs.http][HTTP Output Failure] Encountered non-2XX HTTP code 400 {:response_code=>400, :url"https://some url:8086/write?db=db", :event=>%{host} %{message}, will_retry=>false

The configuration file is shown below:

input {
  tcp {
    id => "endpoint"
    type => 'endpoint'
    port => "9000"
    codec => "json"
    enable_metric => "false"
    ssl_enable => "false"
  }
}

filter {
  if [type] == "endpoint" {
    ruby {
      code => "
        dig = even.get('timeliness')
        process = dig['entries'][0]['label']
        diff = dig['entries'][0]['end'] - dig['entries'][0]['start']
        header = event.get('[header]')
        count = header['intercepts'].to_f
        event.set('process',process)
        event.set('process_time',diff)
        event.set('count',count)
        event.set('avg',(diff/count).round(2))
       "
       remove_field => ["timeliness"]
    }
    mutate {
      add_field => {"hostname" => "%{[header][hostname]}"}
      add_field => {"time" => "%{[header][timestamp]}"}
      remove_field => ["header", "uuid"]
    }
  }
}

output {
  if [type] == "endpoint" {
    http {
      http_method => "post"
      url => "https://some url:8086/write?db=db"
      format => "message"
      message => "endpoint,process=%{[process]},hostname=%{[hostname]}
      process_time= %{[process_time]},avg_time=%{[avg]},count=%{[count]} %{[time]}"
      truststore =? "location/of/trustore"
      trustore_password => "trust_store_password"
    }
  }
}

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