Dynamically read the event data. Not getting expected result

I am reading following json data from file and adding it to kinesis input event data,

{"logstashtestloggroup_123456789": {"index": "testindex","indexproperty": "","patterns":"D:/logstash/config/Patterns/"}

I want to read the index, indexproperty and patterns fields from this data which is stored against "logstashtestloggroup_123456789" key, but I need to generate this "logstashtestloggroup_123456789" key dynamically from the event which I am receiving from kinesis input plugin.

In kinesis input plugin event, I am getting following data after adding the above json data in it,
{
"logstashtestloggroup_123456789"=>{
"index" => "testindex",
"indexproperty" => "",
"patterns" => "D:/logstash/config/Patterns/"
}
"owner" => "123456789",
"logGroup" => "logstashtestloggroup",
"logStream" => "logstashtestloggroupstream",
"message" => "Nov 1 21:14:23 scorn kernel: pid 84558 (expect), uid 30206: exited on signal 3",
"subscriptionFilters" => [
[0] "logstash-test-stream"
]
}

The syntax i am using to access the index, indexproperty and patterns fields is as follows,

%{[%[{logGroup}]_%{[owner]}][index]}

%{[%[{logGroup}]_%{[owner]}][indexproperty]}

%{[%[{logGroup}]_%{[owner]}][patterns]}

but it is not giving the expected result.

Is there any issue with Syntax? Or is there any other approach available to access this data?

Thanks for the help in advance.

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