# Getting new uuid every hour in logstash pipeline

**URL:** <https://discuss.elastic.co/t/getting-new-uuid-every-hour-in-logstash-pipeline/243406>\
**Category:** Logstash\
**Created:** [July 31, 2020, 10:07pm UTC](https://discuss.elastic.co/t/getting-new-uuid-every-hour-in-logstash-pipeline/243406 "2020-07-31T22:07:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gopal\_Chauhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gopal_chauhan/32/51033_2.png) [@Gopal\_Chauhan](https://discuss.elastic.co/u/Gopal_Chauhan)\
**Post date:** [July 31, 2020, 10:07pm UTC](https://discuss.elastic.co/t/getting-new-uuid-every-hour-in-logstash-pipeline/243406/1 "2020-07-31T22:07:05Z")

</div>

Hi,

I want to assign one unique id to all event/messages processed by logstash pipeline with in one hour.

how can i do that? is there any timer which i can use to check that one hour has passes and now need to change the uuid.

Thanks,  
Gopal

---

<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:** [July 31, 2020, 10:32pm UTC](https://discuss.elastic.co/t/getting-new-uuid-every-hour-in-logstash-pipeline/243406/2 "2020-07-31T22:32:30Z")

</div>

Use a ruby filter to strftime Time.now to a date and hour, then either use that as the id or pass it through a fingerprint filter.

---

<div class="post-metadata">

**Author:** ![Gopal\_Chauhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gopal_chauhan/32/51033_2.png) [@Gopal\_Chauhan](https://discuss.elastic.co/u/Gopal_Chauhan)\
**Post date:** [August 7, 2020, 4:18pm UTC](https://discuss.elastic.co/t/getting-new-uuid-every-hour-in-logstash-pipeline/243406/3 "2020-08-07T16:18:40Z")

</div>

Thanks that worked.

---

<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:** [September 4, 2020, 4:18pm UTC](https://discuss.elastic.co/t/getting-new-uuid-every-hour-in-logstash-pipeline/243406/4 "2020-09-04T16:18:44Z")

</div>

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