# Has anybody used date\_happened for the datadog logstash output plugin

**URL:** <https://discuss.elastic.co/t/has-anybody-used-date-happened-for-the-datadog-logstash-output-plugin/60949>\
**Category:** Logstash\
**Created:** [September 19, 2016, 9:53pm UTC](https://discuss.elastic.co/t/has-anybody-used-date-happened-for-the-datadog-logstash-output-plugin/60949 "2016-09-19T21:53:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamthealex](https://avatars.discourse-cdn.com/v4/letter/i/e9c0ed/32.png) [@iamthealex](https://discuss.elastic.co/u/iamthealex)\
**Post date:** [September 19, 2016, 9:53pm UTC](https://discuss.elastic.co/t/has-anybody-used-date-happened-for-the-datadog-logstash-output-plugin/60949/1 "2016-09-19T21:53:55Z")

</div>

I am unable to find an example config.  
The documentation says string.  
I tried  
date\_happened =\> "1474319717"

that didn't work

I turned up verbosity on logstash  
I see that when I don't specify date\_happened in my filter, that the plugin uses a number (not a string):

DataDog event {:dd\_event=\>{"title"=\>"short test title", "text"=\>"arbitrary text for testing, using warning for alert\_type, 5:04:03", "source\_type\_name"=\>"my apps", "alert\_type"=\>"warning", "date\_happened"=\>1474320888},

This request succeeded with a 202 response code.

so I tried using a number in my plugin

```
date_happened => 1474320888

```

but the plugin converts my number to a string and sends date\_happenned as a string to datadog.

This request fails with a 400.

So, how can I specify date\_happened?

Yes, I realize that if I leave it off, that the plugin will use "now".  
However, I don't want "now".  
I want to be able to specify the time.

I even tried this hack with no joy (still get a 400).

filter {  
mutate {  
rename =\> { "[message]" =\> "[@metadata][incoming-message]" }  
add\_field =\> { "[epoch-start]" =\> "1474319717" }  
}

# Set @TIMESTAMP from epoch-start

date { match =\> ["[epoch-start]", "UNIX\_MS" ] }  
}

---

<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:** [July 6, 2017, 4:37am UTC](https://discuss.elastic.co/t/has-anybody-used-date-happened-for-the-datadog-logstash-output-plugin/60949/2 "2017-07-06T04:37:56Z")

</div>

Closed on July 6, 2017, 4:37am UTC


