lucashenning / logstash-filter-rest

REST Filter for Logstash
Other
43 stars 51 forks source link

Configurable key for the response data #1

Closed bradvido closed 9 years ago

bradvido commented 9 years ago

It would be nice to let the user specify the "key" where the response data is located. This would be optional with a sensible default.

So a config param like response_key => "http_response" would end up putting the response body under a key named http_response. It would look like this: { /* other event json */, "http_response": {response_body} }

Or if the response is json, then: { /* other event json */, "http_response": {"key1": "val1", "key2": "val2", ... } }

lucashenning commented 9 years ago

Hi @bradvido, thank you for your suggestion :) I think the custom response key is a very good idea. I've just added a few lines to enable this feature. New parameter: "response_key"

I will take a look at your other issue and maybe upload a new gem version tomorrow.

lucashenning commented 9 years ago

This has been implemented. Thank you for your suggestion :)