# Problem using timeout\_timestamp\_field in the aggregate filter

**URL:** https://discuss.elastic.co/t/problem-using-timeout-timestamp-field-in-the-aggregate-filter/177379
**Category:** Logstash
**Created:** [April 17, 2019, 10:13pm UTC](https://discuss.elastic.co/t/problem-using-timeout-timestamp-field-in-the-aggregate-filter/177379 "2019-04-17T22:13:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lens](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@lens](https://discuss.elastic.co/u/lens)
#### Post date: [April 17, 2019, 10:13pm UTC](https://discuss.elastic.co/t/problem-using-timeout-timestamp-field-in-the-aggregate-filter/177379/1 "2019-04-17T22:13:38Z")

</div>

Hi,  
I'm trying to use the aggregate filter with a timeout based on a timestamp in the event.

In the filter, I have set  
`timeout_timestamp_field => "start"`

When I run logstash, I get the error  
`undefined method 'time' for 1517443429.255:Float`  
`at /lib/logstash/filters/aggregate.rb:438:in 'reference_timestamp'`  
That method is very short:  
`def reference_timestamp(event)`  
`return (@timeout_timestamp_field) ? event.get(@timeout_timestamp_field).time : Time.now`  
`end`

1517443429.255 must be the value of start in the first event.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 17, 2019, 10:31pm UTC](https://discuss.elastic.co/t/problem-using-timeout-timestamp-field-in-the-aggregate-filter/177379/2 "2019-04-17T22:31:37Z")

</div>

> [@lens](#):
>
> undefined method 'time' for 1517443429.255:Float

That's right. A float does not have a method called float. A Logstash::TimeStamp does. Try

```
date { match => ["start", UNIX] target => "start" }

```

before the aggreegate.

---

<div class="post-metadata">

### Author: ![lens](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@lens](https://discuss.elastic.co/u/lens)
#### Post date: [April 18, 2019, 2:00pm UTC](https://discuss.elastic.co/t/problem-using-timeout-timestamp-field-in-the-aggregate-filter/177379/3 "2019-04-18T14:00:21Z")

</div>

> [@Badger](#):
>
> date { match =\> ["start", UNIX] target =\> "start" }

That worked! Thanks!

---

<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 16, 2019, 2:00pm UTC](https://discuss.elastic.co/t/problem-using-timeout-timestamp-field-in-the-aggregate-filter/177379/4 "2019-05-16T14:00:28Z")

</div>

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