# Grok Parsing Timestamp Error

**URL:** <https://discuss.elastic.co/t/grok-parsing-timestamp-error/116576>\
**Category:** Logstash\
**Created:** [January 23, 2018, 3:35am UTC](https://discuss.elastic.co/t/grok-parsing-timestamp-error/116576 "2018-01-23T03:35:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rijinmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rijinmp/32/24634_2.png) [@rijinmp](https://discuss.elastic.co/u/rijinmp)\
**Post date:** [January 23, 2018, 3:35am UTC](https://discuss.elastic.co/t/grok-parsing-timestamp-error/116576/1 "2018-01-23T03:35:46Z")

</div>

Log :  
[in24.inetnebr.com](http://in24.inetnebr.com) - - [01/Aug/1995:00:00:01 -0400] "GET /shuttle/missions/sts-68/news/sts-68-mcc-05.txt HTTP/1.0" 200 1839

Pattern :  
%{HOSTNAME:vhost} - - %{DATA:Raw\_timestamp} "%{DATA:Method} /%{DATA:File} %{DATA:VersionP} %{NUMBER:Count} %{NUMBER:Response}

Output :  
{  
"vhost": [  
[  
"[in24.inetnebr.com](http://in24.inetnebr.com)"  
]  
],  
"Raw\_timestamp": [  
[  
"[01/Aug/1995:00:00:01 -0400]"  
]  
],  
"Method": [  
[  
"GET"  
]  
],  
"File": [  
[  
"shuttle/missions/sts-68/news/sts-68-mcc-05.txt"  
]  
],  
"VersionP": [  
[  
"HTTP/1.0""  
]  
],  
"Count": [  
[  
"200"  
]  
],  
"BASE10NUM": [  
[  
"200",  
"1839"  
]  
],  
"Response": [  
[  
"1839"  
]  
]  
}

time stamp is parsing here : "[01/Aug/1995:00:00:01 -0400]"

I would like to parse like : "01/Aug/1995:00:00:01 -0400"

For that i am edited the pattern like this :

%{HOSTNAME:vhost} - - [%{DATA:Raw\_timestamp}] "%{DATA:Method} /%{DATA:File} %{DATA:VersionP} %{NUMBER:Count} %{NUMBER:Response}

In the patters added square bracket . But showing error.  
I dont want sqare bracket in time stamp. help me to remove that square bracket from parsed data.

---

<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:** [February 20, 2018, 3:36am UTC](https://discuss.elastic.co/t/grok-parsing-timestamp-error/116576/2 "2018-02-20T03:36:01Z")

</div>

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