# How to create time variable in input plugin

**URL:** https://discuss.elastic.co/t/how-to-create-time-variable-in-input-plugin/230647
**Category:** Logstash
**Created:** [April 30, 2020, 11:15pm UTC](https://discuss.elastic.co/t/how-to-create-time-variable-in-input-plugin/230647 "2020-04-30T23:15:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alxsss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alxsss/32/69929_2.png) [@alxsss](https://discuss.elastic.co/u/alxsss)
#### Post date: [April 30, 2020, 11:15pm UTC](https://discuss.elastic.co/t/how-to-create-time-variable-in-input-plugin/230647/1 "2020-04-30T23:15:38Z")

</div>

Hello, I use http\_poller plugin as an input plugin. I need to pass current hour and previous hour as parameter values to its url. I wondered how this could be done, since did not find any documentation on this.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 1, 2020, 12:36am UTC](https://discuss.elastic.co/t/how-to-create-time-variable-in-input-plugin/230647/2 "2020-05-01T00:36:37Z")

</div>

Answered [here](https://discuss.elastic.co/t/logstash-initialize-variables-before-input/227684/2).

---

<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: [May 29, 2020, 12:44am UTC](https://discuss.elastic.co/t/how-to-create-time-variable-in-input-plugin/230647/3 "2020-05-29T00:44:56Z")

</div>

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