# First time with grok

**URL:** <https://discuss.elastic.co/t/first-time-with-grok/300867>\
**Category:** Elasticsearch\
**Created:** [March 28, 2022, 3:29pm UTC](https://discuss.elastic.co/t/first-time-with-grok/300867 "2022-03-28T15:29:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabek.75](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@fabek.75](https://discuss.elastic.co/u/fabek.75)\
**Post date:** [March 28, 2022, 3:29pm UTC](https://discuss.elastic.co/t/first-time-with-grok/300867/1 "2022-03-28T15:29:30Z")

</div>

Hi there.  
I'm trying to use grok for the first time to parse a line log like this:  
`Mar 15 10:45:13 myapp.com myapp: [Info] <99999999999999> /path/path1: [10.255.255.255:99999] POST /our_queue/worker/import? 204`

In the Dev tools, with this syntax

```auto
%{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST:host.hostname} %{DATA:process.name}(:) 
%{LOGLEVEL:log-level} %{GREEDYDATA:message}

```

But is not working. The Debugger should recognize these predefined patterns, no?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 28, 2022, 3:54pm UTC](https://discuss.elastic.co/t/first-time-with-grok/300867/2 "2022-03-28T15:54:55Z")

</div>

You are missing the brackets around the Log Level note the are escaped

`%{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST:host.hostname} %{DATA:process.name}(:) \[%{LOGLEVEL:log-level}\] %{GREEDYDATA:message}`

---

<div class="post-metadata">

**Author:** ![fabek.75](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@fabek.75](https://discuss.elastic.co/u/fabek.75)\
**Post date:** [March 29, 2022, 7:43am UTC](https://discuss.elastic.co/t/first-time-with-grok/300867/3 "2022-03-29T07:43:10Z")

</div>

Thank you. I wrongly assumed the LOGLEVEL pattern included the square brackets.

---

<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, 7:43am UTC](https://discuss.elastic.co/t/first-time-with-grok/300867/4 "2022-04-26T07:43:33Z")

</div>

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