# Need to Insert custom data!

**URL:** https://discuss.elastic.co/t/need-to-insert-custom-data/35044
**Category:** Logstash
**Created:** [November 19, 2015, 11:38am UTC](https://discuss.elastic.co/t/need-to-insert-custom-data/35044 "2015-11-19T11:38:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gugansankar](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@gugansankar](https://discuss.elastic.co/u/gugansankar)
#### Post date: [November 19, 2015, 11:38am UTC](https://discuss.elastic.co/t/need-to-insert-custom-data/35044/1 "2015-11-19T11:38:15Z")

</div>

My Log file have part of info and API will have a part of information for a SINGLE EVENT

Is it possible to merge these two info as a single document using Logstash [via any of input-plugin/grok pattern] ?

For example , below is my log  
**INFO stream 2015-11-18 14:57:29 7YT65U 1507985470 12.126.143.210 23.231.189.62 443 3625 3752 1.803 http**

API Output:  
**{**  
**"CurrentConnections": "1789",**  
**"TotalConnections": "63689",**  
**"TotalAcceptedConnections": "63589",**  
**"TotalRejectedConnections": "100"**  
**}**

I have to merge above two values.

Also please let me know, is there possible to execute scripts in logstash ?.

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [November 19, 2015, 3:05pm UTC](https://discuss.elastic.co/t/need-to-insert-custom-data/35044/2 "2015-11-19T15:05:27Z")

</div>

You'll probably have to write a custom plugin, or maybe make the API call from a ruby filter.

---

<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: [July 6, 2017, 5:22am UTC](https://discuss.elastic.co/t/need-to-insert-custom-data/35044/3 "2017-07-06T05:22:11Z")

</div>


