# How to use grok then start a record with time

**URL:** <https://discuss.elastic.co/t/how-to-use-grok-then-start-a-record-with-time/155686>\
**Category:** Logstash\
**Created:** [November 7, 2018, 8:30am UTC](https://discuss.elastic.co/t/how-to-use-grok-then-start-a-record-with-time/155686 "2018-11-07T08:30:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aabababba](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aabababba/32/36732_2.png) [@aabababba](https://discuss.elastic.co/u/aabababba)\
**Post date:** [November 7, 2018, 8:30am UTC](https://discuss.elastic.co/t/how-to-use-grok-then-start-a-record-with-time/155686/1 "2018-11-07T08:30:56Z")

</div>

```auto
Nov 06, 2018 3:29:10 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [spring] in context with path [] threw exception [Request processing failed; nested exception is java.lang.ArrayIndexOutOfBoundsException] with root cause
java.lang.ArrayIndexOutOfBoundsException

```

%{HAPROXYTIME:logtime} and %{TIMESTAMP\_ISO8601:logtime} not work

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [November 9, 2018, 7:50pm UTC](https://discuss.elastic.co/t/how-to-use-grok-then-start-a-record-with-time/155686/2 "2018-11-09T19:50:58Z")

</div>

If the standard time formats do not work then you have to make your own like this:

%{MONTH} %{MONTHDAY}, %{YEAR} %{TIME} %{WORD:AMorPM}

---

<div class="post-metadata">

**Author:** ![aabababba](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aabababba/32/36732_2.png) [@aabababba](https://discuss.elastic.co/u/aabababba)\
**Post date:** [November 12, 2018, 2:10am UTC](https://discuss.elastic.co/t/how-to-use-grok-then-start-a-record-with-time/155686/3 "2018-11-12T02:10:03Z")

</div>

thanks you,only this way now。。。

---

<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 10, 2018, 2:10am UTC](https://discuss.elastic.co/t/how-to-use-grok-then-start-a-record-with-time/155686/4 "2018-12-10T02:10:04Z")

</div>

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