# Need to get any help in parsing a complicated logs

**URL:** <https://discuss.elastic.co/t/need-to-get-any-help-in-parsing-a-complicated-logs/281671>\
**Category:** Logstash\
**Created:** [August 17, 2021, 11:01am UTC](https://discuss.elastic.co/t/need-to-get-any-help-in-parsing-a-complicated-logs/281671 "2021-08-17T11:01:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MT2021](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@MT2021](https://discuss.elastic.co/u/MT2021)\
**Post date:** [August 17, 2021, 11:01am UTC](https://discuss.elastic.co/t/need-to-get-any-help-in-parsing-a-complicated-logs/281671/1 "2021-08-17T11:01:57Z")

</div>

Hi team,  
I am very new in Grok.  
I am struggling at this point. I cannot make a parser for below log file.  
The issue comes in [17/Aug/2021:16:46:33 +0700]. I cannot pass it.

```auto
192.168.40.100 - - [17/Aug/2021:16:46:33 +0700] "GET /favicon.ico HTTP/1.1" 404 493 "http://192.168.40.105/" "Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1"

```

I have try to solve it but without success.

```auto
%{IP:ipaddress} - - \[%{TIMESTAMP_ISO8601:time} %{NOTSPACE:tz}\]%{GREEDYDATA:rest}

```

It is very appreciated to any helk or pointing out my bad.  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [August 17, 2021, 11:13am UTC](https://discuss.elastic.co/t/need-to-get-any-help-in-parsing-a-complicated-logs/281671/2 "2021-08-17T11:13:11Z")

</div>

Try just `%{COMBINEDAPACHELOG:message}`.

The reason why yours is not working is due to the timestamp (and maybe others, didn't go through it all). You can see the patterns for things such as `TIMESTAMP_ISO8601` [here](https://github.com/hpcugent/logstash-patterns/blob/master/files/grok-patterns) which you can see that pattern does not match your data. Your time matches the `HTTPDATE` pattern.

But when you do `COMBINEDAPACHELOG` it should parse it all since it's a common log type.

---

<div class="post-metadata">

**Author:** ![MT2021](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@MT2021](https://discuss.elastic.co/u/MT2021)\
**Post date:** [August 17, 2021, 1:49pm UTC](https://discuss.elastic.co/t/need-to-get-any-help-in-parsing-a-complicated-logs/281671/3 "2021-08-17T13:49:27Z")

</div>

**WOWW! Brilliant!**

It works with COMBINEAPACHELOG perfectly.  
Thanks for the speedy response!

---

<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:** [September 14, 2021, 1:49pm UTC](https://discuss.elastic.co/t/need-to-get-any-help-in-parsing-a-complicated-logs/281671/4 "2021-09-14T13:49:41Z")

</div>

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