# Filter with spaces and extra pattern

**URL:** <https://discuss.elastic.co/t/filter-with-spaces-and-extra-pattern/218162>\
**Category:** Logstash\
**Created:** [February 6, 2020, 11:46am UTC](https://discuss.elastic.co/t/filter-with-spaces-and-extra-pattern/218162 "2020-02-06T11:46:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben240489](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@Ben240489](https://discuss.elastic.co/u/Ben240489)\
**Post date:** [February 6, 2020, 11:46am UTC](https://discuss.elastic.co/t/filter-with-spaces-and-extra-pattern/218162/1 "2020-02-06T11:46:45Z")

</div>

Hi guys,

I have another parsing question 🙂  
My filebeat and logstash are working fine except for a problem in parsing a time in the format HH.MM.SS instead of the double point.

My message currently looks like this:  
`22.01.2020 ! 08.35.34 ! 92 ! MY TEXT ! 122#!`

My filter looks like this:  
`match => {"message" => "%{DATE_EU:date}\s*!\s*%{TIME:time}\s*!\s*%{INT:number}\s*!\s*%{DATA:text}\s*!\s*%{INT:occurence}#!"}`

My "extra.grok" definition of TIME:  
`TIME %{BASE10NUM}.%{BASE10NUM}.%{BASE10NUM}`

But somehow, the field "time", "number" and "text" are not filled correctly in Kibana due to the "time" being with points...

Can you advise how to solve it? What am I missing? It takes for "time" only the first 2 digits until the point and therefore the output shifts for these values ☹

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 6, 2020, 6:31pm UTC](https://discuss.elastic.co/t/filter-with-spaces-and-extra-pattern/218162/2 "2020-02-06T18:31:41Z")

</div>

> [@Ben240489](#):
>
> %{BASE10NUM}.%{BASE10NUM}.%{BASE10NUM}

Try

```
pattern_definitions => { "TIME" => "%{INT}\.%{INT}\.%{INT}" }

```

---

<div class="post-metadata">

**Author:** ![Ben240489](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@Ben240489](https://discuss.elastic.co/u/Ben240489)\
**Post date:** [February 7, 2020, 10:36am UTC](https://discuss.elastic.co/t/filter-with-spaces-and-extra-pattern/218162/3 "2020-02-07T10:36:48Z")

</div>

You're a genius, that's what did the trick 🙂  
Thank you so much!!  
It didn't work when I added it to my extra.grok pattern file which I link within the logstash but it worked directly in the logstash file 🙂

---

<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:** [March 6, 2020, 10:36am UTC](https://discuss.elastic.co/t/filter-with-spaces-and-extra-pattern/218162/4 "2020-03-06T10:36:49Z")

</div>

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