Logstash output http add param

Hi

The following is my configuration. I want to add parameters, but there will be errors.

output {
stdout {
codec => json
}
if([@metadata][_index] == "need_before_load_forecast") {
http {
url => "http://localhost:9205/test/_update_by_query"
http_method => "post"
format => "message"
content_type => "application/json"
message => '{"script":{"source":"ctx._source.status = 1","lang":"painless"},"query":{"range":{"time":{"from":"%{[time][0..9]}T00:00:00.000+08:00","to":"%{[time][0..9]}T23:59:59.999+08:00","time_zone":"+08:00"}}}}'
}
}
...

How should I configure it?

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