Closed kares closed 2 years ago
target_body
is now required in ECS mode,
target_headers
still defaults to [@metadata][filter][http][response][headers]
in ECS mode.
my logic is that when there's a response header to extract users configuring target_headers => [foo]
(anything that isn't meta-data) will copy the relevant parts elsewhere and drop the [foo]
field (dropping all irrelevant response headers one by one is not feasible), thus having a @metadata
default target would make sense?
rebased due changes on main which lead to conflicts ...
Plugin uses
target_body => '[body]'
andtarget_headers => '[headers]
' in legacy mode, these were updated to:target_body
default torequired to be set in ECS mode[http][request][body][content]
in ECS modetarget_headers
default to[@metadata][filter][http][request][headers]
in ECS mode~~However there's one TODO left - suppose the returned response body is
{ "foo": "bar" }
with theapplication/json
header. The plugin detects the JSON format and parses the body before setting the content intotarget_body
and thus ends up with:event.get '[http][request][body][content][foo]'
=>"bar"
~~