When using bulk_message_request_threshold to set a max on bulk request size, a few requests seems to not have a body
my guess is that the buffer only contains records bigger than bulk_message_request_threshold so the request is empty
the following error message shows up in the logs
2022-10-12 14:51:33 +0000 [warn]: #0 [elasticearch_output] failed to flush the buffer. retry_times=3 next_retry_time=2022-10-12 14:51:42 +0000 chunk="5ead6ab0ace58a1ac1712bba5a3a4fcc" error_class=Fluent::Plugin::ElasticsearchOutput::RecoverableRequestFailure error="could not push logs to Elasticsearch cluster (fluentd-k8s-master-audit): [400] {\"error\":{\"root_cause\":[{\"type\":\"parse_exception\",\"reason\":\"request body is required\"}],\"type\":\"parse_exception\",\"reason\":\"request body is required\"},\"status\":400}"
Another problem with this is that this request is considered recoverable (like 413) so a lot of networks requests are going to be "wasted" on this
Problem
When using bulk_message_request_threshold to set a max on bulk request size, a few requests seems to not have a body my guess is that the buffer only contains records bigger than bulk_message_request_threshold so the request is empty
the following error message shows up in the logs
Another problem with this is that this request is considered recoverable (like 413) so a lot of networks requests are going to be "wasted" on this
Steps to replicate
Expected Behavior or What you need to ask
All requests should have a body
Using Fluentd and ES plugin versions