# Overriding field values in logstash-filter-metrics events

**URL:** https://discuss.elastic.co/t/overriding-field-values-in-logstash-filter-metrics-events/109446
**Category:** Logstash
**Created:** [November 28, 2017, 5:24pm UTC](https://discuss.elastic.co/t/overriding-field-values-in-logstash-filter-metrics-events/109446 "2017-11-28T17:24:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![titiu7](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@titiu7](https://discuss.elastic.co/u/titiu7)
#### Post date: [November 28, 2017, 5:24pm UTC](https://discuss.elastic.co/t/overriding-field-values-in-logstash-filter-metrics-events/109446/1 "2017-11-28T17:24:26Z")

</div>

Hey all,  
I'm using the filter metrics plugin to generate metrics from tomcat access logs. I'm trying to the get the @timestamp field value to match the timestamp value from the log. To do this, i can use the date filter plugin to change the @timestamp in the metrics filter's events. But this only works in the target field (timestamp from logs) is in the event. How  
How can I add a custom field to the metrics event which I can use with the date filter?  
Or is there a way to automatically override the @timestamp in metrics filter events?

---

<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: [December 26, 2017, 5:24pm UTC](https://discuss.elastic.co/t/overriding-field-values-in-logstash-filter-metrics-events/109446/2 "2017-12-26T17:24:42Z")

</div>

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