# Grok format for \[10-May-2017 16:16:33\] - || Response = 400

**URL:** https://discuss.elastic.co/t/grok-format-for-10-may-2017-1633-response-400/155409
**Category:** Elasticsearch
**Created:** [November 5, 2018, 1:54pm UTC](https://discuss.elastic.co/t/grok-format-for-10-may-2017-1633-response-400/155409 "2018-11-05T13:54:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![satyaban](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@satyaban](https://discuss.elastic.co/u/satyaban)
#### Post date: [November 5, 2018, 1:54pm UTC](https://discuss.elastic.co/t/grok-format-for-10-may-2017-1633-response-400/155409/1 "2018-11-05T13:54:05Z")

</div>

I want to use this pattern in logstash but unable to find pattern for [10-May-2017 16:16:33] timestamp

Kingly help me if anyone knew it.

---

<div class="post-metadata">

### Author: ![jakelandis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jakelandis/32/36163_2.png) [@jakelandis](https://discuss.elastic.co/u/jakelandis)
#### Post date: [November 5, 2018, 3:06pm UTC](https://discuss.elastic.co/t/grok-format-for-10-may-2017-1633-response-400/155409/2 "2018-11-05T15:06:10Z")

</div>

The following should work:

```auto
"\[%{MONTHDAY:day}-%{MONTH:month}-%{YEAR:year} %{TIME:time}\]"

```

Please direct future question to the #logstash topic.

---

<div class="post-metadata">

### Author: ![satyaban](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@satyaban](https://discuss.elastic.co/u/satyaban)
#### Post date: [November 6, 2018, 4:58am UTC](https://discuss.elastic.co/t/grok-format-for-10-may-2017-1633-response-400/155409/3 "2018-11-06T04:58:59Z")

</div>

Thanks a lot @ jakelandis it works . But I need a single variable timestamp which should contain all date and time sothat I can use that in visualization in kibana.

---

<div class="post-metadata">

### Author: ![jakelandis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jakelandis/32/36163_2.png) [@jakelandis](https://discuss.elastic.co/u/jakelandis)
#### Post date: [November 6, 2018, 2:54pm UTC](https://discuss.elastic.co/t/grok-format-for-10-may-2017-1633-response-400/155409/4 "2018-11-06T14:54:48Z")

</div>

In that case you will want something like the following :

```auto
  grok {
     match => {
       message => "\[%{DATA:ts}\]"
     }
   }
  date {
    match => ["ts", "dd-MMM-yyyy HH:mm:ss"]
    remove_field => ["ts"]
  } 

```

Please direct future Logstash question to the #logstash topic.

---

<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 4, 2018, 2:54pm UTC](https://discuss.elastic.co/t/grok-format-for-10-may-2017-1633-response-400/155409/5 "2018-12-04T14:54:57Z")

</div>

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