# \[Filebeat\] Timestamp with nanosecond precision

**URL:** <https://discuss.elastic.co/t/filebeat-timestamp-with-nanosecond-precision/227554>\
**Category:** Beats\
**Created:** [April 10, 2020, 7:31pm UTC](https://discuss.elastic.co/t/filebeat-timestamp-with-nanosecond-precision/227554 "2020-04-10T19:31:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmalecki4](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bmalecki4](https://discuss.elastic.co/u/bmalecki4)\
**Post date:** [April 10, 2020, 7:31pm UTC](https://discuss.elastic.co/t/filebeat-timestamp-with-nanosecond-precision/227554/1 "2020-04-10T19:31:42Z")

</div>

My configuration:

- `filebeat` + `logstash` + `elasticsearch` + `kibana` (with `logtrail`) - all in version `7.6.1`

I have a `mule.log` file which contains information without the `timestamp` field that I could extract to enforce proper order. Snippet from `mule.log`:

```
 --> Wrapper Started as Console
Launching a JVM...
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
Starting the Mule Container...

```

The problem I have is that current precision in `@Timestamp` field causes that f.e. lines `1`-`3` have `2020-06-14T10:04:39.249Z` and lines `4`-`6` have `2020-06-14T10:04:39.250Z`. So both group lines (`1`-`3` and `4`-`6`) are out of order in `logtrail`. For exmaple lines `1`-`3` appear (f.e.):

```
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Launching a JVM...
--> Wrapper Started as Console

```

instead of:

```
--> Wrapper Started as Console
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Launching a JVM...

```

The same goes for lines `4`-`6` (and others with the same `@Timestamp` value).

1. I see that [it supposed to be already handled](https://discuss.elastic.co/t/low-timestamp-precision-cause-wrong-order-of-events-with-docker-input/137051), but either I'm doing somethin wrong (hence the question) or it's only for docker files.
2. I could base order of each "event"/"line"/"message" on the `offset` field but that is not a clean solution.

* * *

**How can I mark each filebeat event, in orde to be able to keep the proper order of events ? (in my case in `logtrail`)**

---

<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 8, 2020, 9:31pm UTC](https://discuss.elastic.co/t/filebeat-timestamp-with-nanosecond-precision/227554/2 "2020-05-08T21:31:45Z")

</div>

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