# Calculating before input plugin

**URL:** https://discuss.elastic.co/t/calculating-before-input-plugin/91527
**Category:** Logstash
**Created:** [July 1, 2017, 7:13pm UTC](https://discuss.elastic.co/t/calculating-before-input-plugin/91527 "2017-07-01T19:13:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Newbie](https://avatars.discourse-cdn.com/v4/letter/n/dc4da7/32.png) [@Newbie](https://discuss.elastic.co/u/Newbie)
#### Post date: [July 1, 2017, 7:13pm UTC](https://discuss.elastic.co/t/calculating-before-input-plugin/91527/1 "2017-07-01T19:13:28Z")

</div>

Hey, i need to calculate index for elasticsearch input based on the current date i've seen there is an option in elasticsearch to send an index as {now/d{dd/mm/yyyy}} but im aggregating data using elastic on the last 5 minutes so when the current time is less than 00.05 I need to query 2 indices, today's and tomorrow's. Is there any way for me to calculate the index before the input plugin or even a built in feature is elasticsearch?  
Thanks in advanced!

---

<div class="post-metadata">

### Author: ![Newbie](https://avatars.discourse-cdn.com/v4/letter/n/dc4da7/32.png) [@Newbie](https://discuss.elastic.co/u/Newbie)
#### Post date: [July 4, 2017, 6:55am UTC](https://discuss.elastic.co/t/calculating-before-input-plugin/91527/2 "2017-07-04T06:55:29Z")

</div>

Bump ☹

---

<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 1, 2017, 6:55am UTC](https://discuss.elastic.co/t/calculating-before-input-plugin/91527/3 "2017-08-01T06:55:55Z")

</div>

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