# Query on getting the complete event data in output plugin

**URL:** https://discuss.elastic.co/t/query-on-getting-the-complete-event-data-in-output-plugin/244608
**Category:** Logstash
**Created:** [August 11, 2020, 5:24pm UTC](https://discuss.elastic.co/t/query-on-getting-the-complete-event-data-in-output-plugin/244608 "2020-08-11T17:24:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bimanarajesh](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@bimanarajesh](https://discuss.elastic.co/u/bimanarajesh)
#### Post date: [August 11, 2020, 5:24pm UTC](https://discuss.elastic.co/t/query-on-getting-the-complete-event-data-in-output-plugin/244608/1 "2020-08-11T17:24:25Z")

</div>

Hi,

In the logstash output plugin, i would like to get the complete event data. Could you please advice on how we can achieve that,. Once the event is received, I would like to wrap it around another json object. This will be done in http output plugin to support kafka-rest format payload.  
want to achieve something like this.  
{  
"records": [ {  
"value" : {event data}  
]  
}  
Thanks,  
Rajesh

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [August 11, 2020, 6:30pm UTC](https://discuss.elastic.co/t/query-on-getting-the-complete-event-data-in-output-plugin/244608/2 "2020-08-11T18:30:18Z")

</div>

If you want to send it as JSON then [this](https://discuss.elastic.co/t/how-to-set-http-filter-body-to-whole-event/243041/2) might help, if you want a string then change that to use event.to\_hash.to\_s

---

<div class="post-metadata">

### Author: ![bimanarajesh](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@bimanarajesh](https://discuss.elastic.co/u/bimanarajesh)
#### Post date: [August 12, 2020, 3:49am UTC](https://discuss.elastic.co/t/query-on-getting-the-complete-event-data-in-output-plugin/244608/3 "2020-08-12T03:49:46Z")

</div>

Thanks you. The provided solution works

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 9, 2020, 3:49am UTC](https://discuss.elastic.co/t/query-on-getting-the-complete-event-data-in-output-plugin/244608/4 "2020-09-09T03:49:47Z")

</div>

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