# Timestamps precision in beats

**URL:** https://discuss.elastic.co/t/timestamps-precision-in-beats/154646
**Category:** Beats
**Tags:** filebeat
**Created:** [October 30, 2018, 12:00pm UTC](https://discuss.elastic.co/t/timestamps-precision-in-beats/154646 "2018-10-30T12:00:37Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![George\_Sovetov](https://avatars.discourse-cdn.com/v4/letter/g/e79b87/32.png) [@George\_Sovetov](https://discuss.elastic.co/u/George_Sovetov)
#### Post date: [November 22, 2018, 1:31pm UTC](https://discuss.elastic.co/t/timestamps-precision-in-beats/154646/11 "2018-11-22T13:31:21Z")

</div>

What I ended up with now is:

```
  if [@metadata][beat] == "filebeat" {
    ruby {
      code => "event.set('logstash_processed_at', Time.now());"
    }
  }

```

Found it here: [Add current timestamp to a logstash\_processed\_at field](https://discuss.elastic.co/t/add-current-timestamp-to-a-logstash-processed-at-field/109745/3?u=george_sovetov)

---

_[View the full topic](https://discuss.elastic.co/t/timestamps-precision-in-beats/154646)._
