# Is there a way to generate an Increment and Unique ID in logstash?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-generate-an-increment-and-unique-id-in-logstash/83008>\
**Category:** Logstash\
**Created:** [April 20, 2017, 8:16am UTC](https://discuss.elastic.co/t/is-there-a-way-to-generate-an-increment-and-unique-id-in-logstash/83008 "2017-04-20T08:16:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elastic\_johnson\_yi](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@elastic\_johnson\_yi](https://discuss.elastic.co/u/elastic_johnson_yi)\
**Post date:** [April 20, 2017, 8:16am UTC](https://discuss.elastic.co/t/is-there-a-way-to-generate-an-increment-and-unique-id-in-logstash/83008/1 "2017-04-20T08:16:38Z")

</div>

What I really want is a unique ID, but not UUID. Because UUID is too long, and I don't need the ID to be universally unique. Just being unique in my own server will be fine enough.

The UUID plugin is quite close to what I want, but I hope the return is an increment unique number. Is there any way to get this kind of ID?

Thanks.

---

<div class="post-metadata">

**Author:** ![pablosan](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@pablosan](https://discuss.elastic.co/u/pablosan)\
**Post date:** [April 20, 2017, 8:41am UTC](https://discuss.elastic.co/t/is-there-a-way-to-generate-an-increment-and-unique-id-in-logstash/83008/2 "2017-04-20T08:41:58Z")

</div>

Someone came up with an idea for this already.

> <https://stackoverflow.com/questions/25482663/how-to-add-sequence-id-when-using-logstash-to-parse-log>

But I think it's not possible from Elasticsearch.

---

<div class="post-metadata">

**Author:** ![elastic\_johnson\_yi](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@elastic\_johnson\_yi](https://discuss.elastic.co/u/elastic_johnson_yi)\
**Post date:** [April 20, 2017, 8:58am UTC](https://discuss.elastic.co/t/is-there-a-way-to-generate-an-increment-and-unique-id-in-logstash/83008/3 "2017-04-20T08:58:36Z")

</div>

Thanks so much, this is just what I want !

---

<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 18, 2017, 9:08am UTC](https://discuss.elastic.co/t/is-there-a-way-to-generate-an-increment-and-unique-id-in-logstash/83008/4 "2017-05-18T09:08:22Z")

</div>

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