Hello i need some help translating this CURL request into a http filter syntax
curl -k -u username:password -X POST 'https://192.168.88.1/rest/tool/flood-ping' \--data '{"address":"192.168.88.223","count":"12","interval":"20ms"}' \
-H "content-type: application/json"
This command WORKS as it returns this response:
[{".section":"0","avg-rtt":"1","max-rtt":"1","min-rtt":"1","received":"1","sent":"2"},{".section":"1","avg-rtt":"1","max-rtt":"1","min-rtt":"1","received":"12","sent":"12"}]%
Wich is the expected one.
As of now i have tried this configuration of the http filter plugin.
input {
stdin {
}
}
filter {
http {
url => "https://%{message}/rest/tool/flood-ping"
user => "username"
password => "password"
headers => {
"Content-Type" => "application/json"
}
verb => "POST"
ssl_verification_mode => "none"
query => {
"address" => "192.168.88.223"
"interval" => "20ms"
"count" => "120"
}
target_body => "respt"
}
}
output {
stdout {
}
}
But im getting this message:
[ERROR] 2022-08-31 21:26:17.884 [[main]>worker0] http - error during HTTP request {:url=>"https://192.168.88.1/rest/tool/flood-ping", :code=>400, :response=>"{\"detail\":\"missing values (5)\",\"error\":400,\"message\":\"Bad Request\"}"}
{
"@version" => "1",
"@timestamp" => 2022-09-01T01:26:15.342475Z,
"event" => {
"original" => "192.168.88.1"
},
"message" => "192.168.88.1",
"host" => {
"hostname" => "pragma"
},
"tags" => [
[0] "_httprequestfailure"
]
}
Thanks in advance for any help that can be provided.