# Mapping reports to Elasticsearch

**URL:** <https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921>\
**Category:** Elasticsearch\
**Created:** [July 6, 2018, 1:13pm UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921 "2018-07-06T13:13:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshua625](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@joshua625](https://discuss.elastic.co/u/joshua625)\
**Post date:** [July 6, 2018, 1:13pm UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/1 "2018-07-06T13:13:25Z")

</div>

Hello,

I have few reports that needs to be ingested or mapped as a whole file individually into elasticsearch and creating a specific index for all the reports i.e creating a dropdown for each and every individual report. How do I achieve this within ELK and how would I write a script to create a dashboard based on the timeframe that these reports are being ingested. ex: from 2 days earlier to now or specifically mentioning any day or time ??

Thanks,  
Joshua.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 7, 2018, 7:39am UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/2 "2018-07-07T07:39:30Z")

</div>

Depends on what format the reports are in.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 7, 2018, 9:24pm UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/4 "2018-07-07T21:24:34Z")

</div>

Yep, there's a CSV filter in Logstash that would help.

---

<div class="post-metadata">

**Author:** ![joshua625](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@joshua625](https://discuss.elastic.co/u/joshua625)\
**Post date:** [July 8, 2018, 1:14am UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/5 "2018-07-08T01:14:15Z")

</div>

@warkolm,

But, that would ship as multiple events through filebeat or "file" input filter of logstash. In my use case, I have some reports generated by a tool everyday. so, to avoid duplication of data I need to search specific reports that I should get it as entire file instead of getting as events. something like a drop down specifically to query my index using any particular csv file report to get the desired results. do we have any options that I could map my software to Elasticsearch ??

Thanks,  
Joshua.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 8, 2018, 5:52am UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/6 "2018-07-08T05:52:16Z")

</div>

So some reports might be updated day-to-day and they need to be overwritten? That's ok!

You can just take a few fields from the document and create your own Elasticsearch `_id`. Then Logstash can use that to index the report, so if an update happens it will use those same fields and create the same `-id` and Elasticsearch will treat it as an update 🙂

---

<div class="post-metadata">

**Author:** ![joshua625](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@joshua625](https://discuss.elastic.co/u/joshua625)\
**Post date:** [July 8, 2018, 2:20pm UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/7 "2018-07-08T14:20:41Z")

</div>

@warkolm,

This will definitely help me out. But, how would I check the whole report or search for the previous reports i.e like a list of reports that I wanted to look through for future ref and avoiding the redundancy.  
or let me ask this, do we need write a script to get the latest reports ?

Thanks,  
Joshua.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 9, 2018, 2:15am UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/8 "2018-07-09T02:15:02Z")

</div>

You just search by ID or by date or whatever.

---

<div class="post-metadata">

**Author:** ![joshua625](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@joshua625](https://discuss.elastic.co/u/joshua625)\
**Post date:** [July 9, 2018, 1:20pm UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/9 "2018-07-09T13:20:47Z")

</div>

I will try that . Thanks @warkolm 🙂

---

<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 6, 2018, 1:20pm UTC](https://discuss.elastic.co/t/mapping-reports-to-elasticsearch/138921/10 "2018-08-06T13:20:48Z")

</div>

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