# How to use "DAY" Grok Pattern on Filebeat Multiline

**URL:** https://discuss.elastic.co/t/how-to-use-day-grok-pattern-on-filebeat-multiline/300910
**Category:** Beats
**Tags:** filebeat
**Created:** [March 29, 2022, 4:39am UTC](https://discuss.elastic.co/t/how-to-use-day-grok-pattern-on-filebeat-multiline/300910 "2022-03-29T04:39:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mvasqueznr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvasqueznr/32/102515_2.png) [@mvasqueznr](https://discuss.elastic.co/u/mvasqueznr)
#### Post date: [March 29, 2022, 4:39am UTC](https://discuss.elastic.co/t/how-to-use-day-grok-pattern-on-filebeat-multiline/300910/1 "2022-03-29T04:39:38Z")

</div>

Hi.

I'm use the next configuration to read a multiline file on logstash. For identify the begin of the message I use a grok pattern

```auto
 file {
        path => "Sample_Type1/*"
        start_position => "beginning"
        type => "alertlog_type1"
        codec => multiline {
            **pattern => "^%{DAY}"**
            negate => "true"
            what => "previous"
            max_lines => 100000
        }
    }

```

But, when I'm try to use the same configuration on Filebeat this not work.

Any idea for this?

Thanks.

---

<div class="post-metadata">

### Author: ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)
#### Post date: [March 29, 2022, 12:31pm UTC](https://discuss.elastic.co/t/how-to-use-day-grok-pattern-on-filebeat-multiline/300910/2 "2022-03-29T12:31:42Z")

</div>

I don't think u can use a grok pattern for multiline in filebeat. You'll need to just copy the regex that it uses directly.

---

<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: [April 26, 2022, 2:32pm UTC](https://discuss.elastic.co/t/how-to-use-day-grok-pattern-on-filebeat-multiline/300910/3 "2022-04-26T14:32:26Z")

</div>

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