When using KV in logstash, I am getting my key with escaped character, how do i read this value in the Ruby?

I have data coming from Kafka, and the data will look like this:


It is similiar to JSON but it is not. So i thought of using KV filter,

kv {
 source => "header_v1"
value_split => ":"
field_split => ","

But now i am getting key this way:

So when i do event.get('\"x-vcap-request-id\"') but i am getting empty result.

How can i resolve this?

I used the below which solved the problem:

kv {
        remove_char_key => "\""

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