# Read the Logevent into exec output

**URL:** <https://discuss.elastic.co/t/read-the-logevent-into-exec-output/252077>\
**Category:** Logstash\
**Created:** [October 14, 2020, 4:57pm UTC](https://discuss.elastic.co/t/read-the-logevent-into-exec-output/252077 "2020-10-14T16:57:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![praveenmak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveenmak/32/22708_2.png) [@praveenmak](https://discuss.elastic.co/u/praveenmak)\
**Post date:** [October 14, 2020, 4:57pm UTC](https://discuss.elastic.co/t/read-the-logevent-into-exec-output/252077/1 "2020-10-14T16:57:09Z")

</div>

Hello folks,

I want to get the whole event to a shell script, I am trying to use exec output plugin.

Please note, I don't have "message" variable.  
This is the output in JSON.

> `{"taskid":"vMUKrDoBSX-12349","@version":"1","txn"..}`

Here is my output filter I want to use,

> output {  
> exec {  
> command =\> "myscript.sh ${???}"  
> codec =\> "json\_lines"  
> }  
> }

My question is what should I pass in ??? , since I don't have a message. I want to pass the root of event.

---

<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:** [November 11, 2020, 4:57pm UTC](https://discuss.elastic.co/t/read-the-logevent-into-exec-output/252077/2 "2020-11-11T16:57:12Z")

</div>

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