# Storing event data as global variable in key value pair manner

**URL:** <https://discuss.elastic.co/t/storing-event-data-as-global-variable-in-key-value-pair-manner/151279>\
**Category:** Logstash\
**Created:** [October 5, 2018, 8:20pm UTC](https://discuss.elastic.co/t/storing-event-data-as-global-variable-in-key-value-pair-manner/151279 "2018-10-05T20:20:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xyz2](https://avatars.discourse-cdn.com/v4/letter/x/e480ec/32.png) [@xyz2](https://discuss.elastic.co/u/xyz2)\
**Post date:** [October 5, 2018, 8:20pm UTC](https://discuss.elastic.co/t/storing-event-data-as-global-variable-in-key-value-pair-manner/151279/1 "2018-10-05T20:20:57Z")

</div>

Hi,

I have 2 input files . I read a file , then I want to store 2 values from each event as key value pair in global variable something like map in java.  
Then I have another file events. As part of this , I want to search if a key is present in global map (which had values from 1st file) and get the value.

how can I achieve it in logstash ?

---

<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 2, 2018, 8:20pm UTC](https://discuss.elastic.co/t/storing-event-data-as-global-variable-in-key-value-pair-manner/151279/2 "2018-11-02T20:20:59Z")

</div>

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