# Timestamp not enough precision

**URL:** https://discuss.elastic.co/t/timestamp-not-enough-precision/98531
**Category:** Logstash
**Created:** [August 28, 2017, 9:45am UTC](https://discuss.elastic.co/t/timestamp-not-enough-precision/98531 "2017-08-28T09:45:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Robert\_Kovacs](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Robert\_Kovacs](https://discuss.elastic.co/u/Robert_Kovacs)
#### Post date: [August 28, 2017, 9:45am UTC](https://discuss.elastic.co/t/timestamp-not-enough-precision/98531/1 "2017-08-28T09:45:03Z")

</div>

I have logs with time precision of only seconds like this:  
2017-08-09 14:54:38 INFO something  
2017-08-09 14:54:38 INFO something  
2017-08-09 14:54:38 DEBUG something  
2017-08-09 14:54:38 INFO something  
I use the date filter to get a timestamp out of this.

My problem is that since the precision is only in seconds, Kibana messes up the order. I know, that in Kibana I could sort by offset, but I would like to use the 'view surrounding documents' tool and for that I need my logs in correct order by timestamp. How could I use the offset field or anything else in Logstash to make my timestamp give precise order?

---

<div class="post-metadata">

### Author: ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)
#### Post date: [August 28, 2017, 12:04pm UTC](https://discuss.elastic.co/t/timestamp-not-enough-precision/98531/2 "2017-08-28T12:04:48Z")

</div>

if your only problem is the false order in the context view you can configure a tiebreaker field in the advanced settings of kibana with which the order would be determined

Under Managment --\> Advanced Settings --\> context:tieBreakerFields --\> set to e.g. offset

---

<div class="post-metadata">

### Author: ![Robert\_Kovacs](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Robert\_Kovacs](https://discuss.elastic.co/u/Robert_Kovacs)
#### Post date: [August 28, 2017, 12:33pm UTC](https://discuss.elastic.co/t/timestamp-not-enough-precision/98531/3 "2017-08-28T12:33:02Z")

</div>

I wrote in offset but it does not work. I have Kibana 5.5.1

---

<div class="post-metadata">

### Author: ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)
#### Post date: [August 28, 2017, 12:54pm UTC](https://discuss.elastic.co/t/timestamp-not-enough-precision/98531/4 "2017-08-28T12:54:38Z")

</div>

the only problem that should still exist with this is that it is sorted in reverse order (Github Issue [#12937](https://github.com/elastic/kibana/issues/12937))

i don't now of annother way to guarantee the correct order in the context view (besides trying to alter the timestamp milliseconds on logstash side)

---

<div class="post-metadata">

### Author: ![Robert\_Kovacs](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Robert\_Kovacs](https://discuss.elastic.co/u/Robert_Kovacs)
#### Post date: [August 28, 2017, 12:59pm UTC](https://discuss.elastic.co/t/timestamp-not-enough-precision/98531/5 "2017-08-28T12:59:49Z")

</div>

Yeah, I have noticed, it is in reverse order. Anyways, it's more than nothing. Thanks for the tip.

---

<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 25, 2017, 1:00pm UTC](https://discuss.elastic.co/t/timestamp-not-enough-precision/98531/6 "2017-09-25T13:00:04Z")

</div>

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