I have an index in Elasticsearch where the UID is automatically generated, I want to delete documents by query but from Logstash. I am trying different ways like http output plugin, is it the correct option to do so? or Is there any other ways to do it from Logstash?
'input {
stdin {
type => "foo"
}
}
output {
http {
url => "*****/test_ind/_delete_by_query?conflicts=proceed"
http_method => "post"
format => "message"
content_type => "application/json; charset=UTF-8"
message => '{"query": { "match_all": {}}}'
headers => {"Authorization" => "ApiKey ****************************************"}
ssl_supported_protocols => "['TLSv1.2', 'TLSv1.3', 'TLSv1.1']"
}
}'