# Need help with logs

**URL:** <https://discuss.elastic.co/t/need-help-with-logs/26863>\
**Category:** Logstash\
**Created:** [August 5, 2015, 8:53am UTC](https://discuss.elastic.co/t/need-help-with-logs/26863 "2015-08-05T08:53:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smasell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smasell/32/43483_2.png) [@Smasell](https://discuss.elastic.co/u/Smasell)\
**Post date:** [August 5, 2015, 8:53am UTC](https://discuss.elastic.co/t/need-help-with-logs/26863/1 "2015-08-05T08:53:33Z")

</div>

Hi there!!!  
I need to parse 2 field from:  
CLIENT\_LOG: User( ip: 109.132.225.96; user\_id: 90221; name: 'GGG'; days\_in\_game: 1; pvp\_rating: 0; provider: GooglePlay; device\_model: 'samsung SM-G900F';). event\_name: 'Mission\_Start\_BlaBlaBla';  
scene: "Mission\_Start"  
level: "BlaBlaBla"  
Please help

---

<div class="post-metadata">

**Author:** ![Raul\_Uria](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@Raul\_Uria](https://discuss.elastic.co/u/Raul_Uria)\
**Post date:** [August 5, 2015, 9:29am UTC](https://discuss.elastic.co/t/need-help-with-logs/26863/2 "2015-08-05T09:29:44Z")

</div>

Try this for your grok filter:

```
^.*event_name: \'(?<scene>.*)_(?<level>.*?)\';
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 5, 2015, 9:59am UTC](https://discuss.elastic.co/t/need-help-with-logs/26863/3 "2015-08-05T09:59:11Z")

</div>

> ```
> ^.*event_name: \'(?<scene>.*)_(?<level>.*?)\';
> 
> ```

This is dangerous since the first .\* is greedy and could match more than desired. Prefer this:

```
event_name: '(?<scene>[^_]+)_(?<level>[^']+)'

```

This assumes that the scene name never contains an underscore.

---

<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:** [July 6, 2017, 5:32am UTC](https://discuss.elastic.co/t/need-help-with-logs/26863/4 "2017-07-06T05:32:50Z")

</div>


