# I want to use information from 2 files and insert to elasticsearh as a document

**URL:** <https://discuss.elastic.co/t/i-want-to-use-information-from-2-files-and-insert-to-elasticsearh-as-a-document/91813>\
**Category:** Logstash\
**Created:** [July 4, 2017, 8:29pm UTC](https://discuss.elastic.co/t/i-want-to-use-information-from-2-files-and-insert-to-elasticsearh-as-a-document/91813 "2017-07-04T20:29:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![g\_dev](https://avatars.discourse-cdn.com/v4/letter/g/91b2a8/32.png) [@g\_dev](https://discuss.elastic.co/u/g_dev)\
**Post date:** [July 4, 2017, 8:29pm UTC](https://discuss.elastic.co/t/i-want-to-use-information-from-2-files-and-insert-to-elasticsearh-as-a-document/91813/1 "2017-07-04T20:29:57Z")

</div>

I have the situation where I want to parse from the log file and insert each log as a document in elasticsearch but same time I want to get log metadata from another file and insert to the documents created by log file in each document. So I thought of some solutions. So I come up with following questions.

1. I'm not sure how to do in a same logstash job.
2. Is there any way of triggering another logstash after finish parsing of a log file. (As I can use unique id to do that)

---

<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:** [July 7, 2017, 9:32am UTC](https://discuss.elastic.co/t/i-want-to-use-information-from-2-files-and-insert-to-elasticsearh-as-a-document/91813/2 "2017-07-07T09:32:05Z")

</div>

Logstash and its standard plugins doesn't support this kind of content merging very well. I'm sure it's possible to string it together but there's no shrinkwrapped solution.

---

<div class="post-metadata">

**Author:** ![g\_dev](https://avatars.discourse-cdn.com/v4/letter/g/91b2a8/32.png) [@g\_dev](https://discuss.elastic.co/u/g_dev)\
**Post date:** [July 7, 2017, 6:41pm UTC](https://discuss.elastic.co/t/i-want-to-use-information-from-2-files-and-insert-to-elasticsearh-as-a-document/91813/3 "2017-07-07T18:41:26Z")

</div>

Thanks for the reply, yes I did not find any solution either.

---

<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:** [August 4, 2017, 6:42pm UTC](https://discuss.elastic.co/t/i-want-to-use-information-from-2-files-and-insert-to-elasticsearh-as-a-document/91813/4 "2017-08-04T18:42:35Z")

</div>

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