Packetbeat: publish an event with nested objects to elasticsearch in go


(Sumit419) #1

Hi,
I have a custom plugin that generates a list of struct objects. something like [{field 1: value,field 2: value},{field 1: value,field 2: value},,,,] for request field.

I updated the elasticsearch template and set type: nested for my plugin event mapping. How do i assign these values to the fields in go. using Mapstr.

indexing didnt help for event fields.


(Steffen Siering) #2

You have some sample code? Just assigning your struct might work (given symbols are exported). Otherwise you have to transform your structs into MapStr yourself.


(system) #3

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