I recently use logstash-filter-rest, and configure it like below:
rest {
url => "http://example.com/api"
sprintf => true
method => "post"
params => {
"post_key" => "%{a_field_in_log}"
}
response_key => "my_key"
}
after this, logstash make a post request to my api, but something is wrong, the value of a_field_in_log
is identical in every request ( I check api access log, all of the value is the first field value sent to api ) it seems like there have caches for referenced field.
Does someone had encountered same problem, would thank you for your help!
As it happens, I'm the author of logstash-filter-rest and I'm glad to hear that someone is actually using it.
I was able to reproduce your issue. It was a bug and (good news) I fixed it. Thank you for reporting!
You can update now to the new version 0.1.5.
Test config:
Test data:
Result:
http://requestb.in/1f7s1sg1?inspect (looks good)
Many thanks for contributing! I hope everything works as expected now.