# Unique identified per line during logstash

**URL:** <https://discuss.elastic.co/t/unique-identified-per-line-during-logstash/38705>\
**Category:** Logstash\
**Created:** [January 8, 2016, 9:10am UTC](https://discuss.elastic.co/t/unique-identified-per-line-during-logstash/38705 "2016-01-08T09:10:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![subbu.nv](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@subbu.nv](https://discuss.elastic.co/u/subbu.nv)\
**Post date:** [January 8, 2016, 9:10am UTC](https://discuss.elastic.co/t/unique-identified-per-line-during-logstash/38705/1 "2016-01-08T09:10:43Z")

</div>

Hi All,

is there a way to add a uniquer identified per line when we index log files to elastic search. initially i thought of considering time stamp as the unique identifier per line if we are running a single thread, but end up in seeing multiple index instances per time stamp (till milli secs) and there is no support for nano seconds. Please suggest if any one have some idea.

thanks

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [January 8, 2016, 1:18pm UTC](https://discuss.elastic.co/t/unique-identified-per-line-during-logstash/38705/2 "2016-01-08T13:18:16Z")

</div>

Perhaps this filter will help? [https://www.elastic.co/guide/en/logstash/current/plugins-filters-uuid.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-uuid.html)

---

<div class="post-metadata">

**Author:** ![subbu.nv](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@subbu.nv](https://discuss.elastic.co/u/subbu.nv)\
**Post date:** [January 8, 2016, 8:22pm UTC](https://discuss.elastic.co/t/unique-identified-per-line-during-logstash/38705/3 "2016-01-08T20:22:34Z")

</div>

thanks for your response.

i tried out this option. but i think it is not creating in sequence with line order, it is creating some random uid. is there a way we can get sequential increment (pref numbers) per line?

---

<div class="post-metadata">

**Author:** ![subbu.nv](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@subbu.nv](https://discuss.elastic.co/u/subbu.nv)\
**Post date:** [January 9, 2016, 12:33am UTC](https://discuss.elastic.co/t/unique-identified-per-line-during-logstash/38705/4 "2016-01-09T00:33:58Z")

</div>

Hi All,

i found a solution for this in the below link.

> <https://stackoverflow.com/questions/23920655/include-monotonically-increasing-value-in-logstash-field/23921517#23921517>

---

<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:** [July 6, 2017, 5:16am UTC](https://discuss.elastic.co/t/unique-identified-per-line-during-logstash/38705/5 "2017-07-06T05:16:17Z")

</div>


