# Add current timestamp to a logstash\_processed\_at field

**URL:** https://discuss.elastic.co/t/add-current-timestamp-to-a-logstash-processed-at-field/109745
**Category:** Logstash
**Created:** [November 30, 2017, 12:05pm UTC](https://discuss.elastic.co/t/add-current-timestamp-to-a-logstash-processed-at-field/109745 "2017-11-30T12:05:47Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Claude\_Sanderson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/claude_sanderson/32/24875_2.png) [@Claude\_Sanderson](https://discuss.elastic.co/u/Claude_Sanderson)
#### Post date: [November 30, 2017, 12:29pm UTC](https://discuss.elastic.co/t/add-current-timestamp-to-a-logstash-processed-at-field/109745/3 "2017-11-30T12:29:12Z")

</div>

I thought that logs like

```
Nov 1 04:09:02 my-hostname postfix/cleanup[13509]: 3yRj7y3g8wz36b0: info: header X-MyHeader: 1585

```

are processed by Logstash automatically without extra configuration.

I think that Logstash uses some default grok patterns like `SYSLOGBASE2` to extract `timestamp` and replace `@timestamp` with extracted value. So, I don't have any custom date filters.

Idea number 3:

```
ruby { 
    code => "event.set('logstash_processed_at', Time.now());"
}
```

---

_[View the full topic](https://discuss.elastic.co/t/add-current-timestamp-to-a-logstash-processed-at-field/109745)._
