# What's the best way to add some additional information from Logstash to Elasticsearch

**URL:** <https://discuss.elastic.co/t/whats-the-best-way-to-add-some-additional-information-from-logstash-to-elasticsearch/72396>\
**Category:** Logstash\
**Created:** [January 22, 2017, 2:57pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-add-some-additional-information-from-logstash-to-elasticsearch/72396 "2017-01-22T14:57:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaptainFeng](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CaptainFeng](https://discuss.elastic.co/u/CaptainFeng)\
**Post date:** [January 22, 2017, 2:57pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-add-some-additional-information-from-logstash-to-elasticsearch/72396/1 "2017-01-22T14:57:16Z")

</div>

Hi All

I am a Newbie in using Logstash and Elasticsearch. Recently, I got a job which parse some logs and put them into Elasticsearch. And before putting them in, I need to using information of every line to retrieve external information from MySQL. I want to know what's the best way to do this?

I know I could use the official ruby filter or exec filter(put the query code in a file). But I am not familiar with ruby and I don't know whether use exec filter will make the processing slow.

Could anyone help me?

---

<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:** [January 22, 2017, 3:01pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-add-some-additional-information-from-logstash-to-elasticsearch/72396/2 "2017-01-22T15:01:50Z")

</div>

Perhaps you can use the translate filter? While that filter can't look up information in MySQL you might be able to periodically generate static files that the translate filter supports.

---

<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:** [February 19, 2017, 3:02pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-add-some-additional-information-from-logstash-to-elasticsearch/72396/3 "2017-02-19T15:02:15Z")

</div>

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