# Help with particular grok pattern (SOLVED)

**URL:** <https://discuss.elastic.co/t/help-with-particular-grok-pattern-solved/101188>\
**Category:** Logstash\
**Created:** [September 20, 2017, 2:14pm UTC](https://discuss.elastic.co/t/help-with-particular-grok-pattern-solved/101188 "2017-09-20T14:14:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbampa](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sbampa](https://discuss.elastic.co/u/sbampa)\
**Post date:** [September 20, 2017, 2:14pm UTC](https://discuss.elastic.co/t/help-with-particular-grok-pattern-solved/101188/1 "2017-09-20T14:14:08Z")

</div>

Hi all,  
i have a little problem with this type of log:

Wed Sep 20 16:02:39 2017 (186085) -7- ================= FUNCTOR WAITING FOR MSG =================  
Wed Sep 20 16:02:39 2017 (284410) -7- \<----------RECVFROM \<- len [193] bytes  
Wed Sep 20 16:02:39 2017 (340305) -7- Received():13624,0,20001,QLen is 0  
Wed Sep 20 16:02:39 2017 (340329) -7- IPCMutexResource::lock  
Wed Sep 20 16:02:39 2017 (340337) -7- FUNCTOR-ROW: Received pid=13624 id=0 loop=0 port=20001 queuelen=0 recv=258976 sent=258953 status=3

I'm using the followinf configuration in logstash:

filter {  
grok {  
match =\> ["message", "\A%{HTTPDERROR\_DATE:timestamp} (%{NUMBER:bytes}) %{GREEDYDATA:message} "]  
}  
date {  
match =\> ["timestamp", "EEE MMM dd HH:mm:ss yyyy"]  
timezone =\> "Europe/Rome"  
target =\> "@timestamp"  
}  
mutate {  
remove\_field =\> ["timestamp"]  
}

I would like to have every line separate from the other, so the separator is the date, but if the timestamp is equal, i will have all messages in a single block.

Can you help me please?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 21, 2017, 1:37am UTC](https://discuss.elastic.co/t/help-with-particular-grok-pattern-solved/101188/2 "2017-09-21T01:37:03Z")

</div>

> [@sbampa](#):
>
> I would like to have every line separate from the other, so the separator is the date, but if the timestamp is equal, i will have all messages in a single block.

It won't do that, it will treat each line as a separate event.

However your pattern isn't valid, it should be;

```auto
%{HTTPDERROR_DATE:timestamp} \(%{NUMBER:bytes}\) %{GREEDYDATA:message}

```

---

<div class="post-metadata">

**Author:** ![sbampa](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sbampa](https://discuss.elastic.co/u/sbampa)\
**Post date:** [September 21, 2017, 8:13am UTC](https://discuss.elastic.co/t/help-with-particular-grok-pattern-solved/101188/3 "2017-09-21T08:13:31Z")

</div>

Hi all,  
problem was solved.  
I have for other logs the following properties enabled:  
multiline.pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'  
multiline.negate: true  
multiline.match: after

Disabled the rules, now logs has been processed in the right manner.  
Thank's to everyone.

---

<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:** [October 19, 2017, 8:13am UTC](https://discuss.elastic.co/t/help-with-particular-grok-pattern-solved/101188/4 "2017-10-19T08:13:49Z")

</div>

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