# Grok patterns subdivision

**URL:** <https://discuss.elastic.co/t/grok-patterns-subdivision/96346>\
**Category:** Logstash\
**Created:** [August 8, 2017, 9:47pm UTC](https://discuss.elastic.co/t/grok-patterns-subdivision/96346 "2017-08-08T21:47:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SandhyaRani](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@SandhyaRani](https://discuss.elastic.co/u/SandhyaRani)\
**Post date:** [August 8, 2017, 9:47pm UTC](https://discuss.elastic.co/t/grok-patterns-subdivision/96346/1 "2017-08-08T21:47:51Z")

</div>

Hi,

# I have java exception log like this

```
2016-12-16 21:28:05,668 ERROR [int-http-28] [nbiws::::] c.t.d.s.impl.DiagnosticServiceImpl - Error running a diagnostic workflow : 9003: Invalid arguments
com.twowire.dmc.listener.DeviceInteractionException: 9003: Invalid arguments
  at com.twowire.dmc.listener.DeviceInteractionTemplate.execute(DeviceInteractionTemplate.java:102) ~[cms-core-4.2.8.9.jar:4.2.8.9]
  at com.twowire.dmc.listener.DeviceInteractionTemplate.execute(DeviceInteractionTemplate.java:59) ~[cms-core-4.2.8.9.jar:4.2.8.9]

```

and I wanted to parse the

```
 grok {
     match => {
         message => "%{DATESTAMP:timestamp} %{LOGLEVEL:level}( +)\[%{DATA:thread}\] \[%{DATA:mdc}\] %{JAVACLASS:class} - %{JAVALOGMESSAGE:logmessage} %{JAVACLASS:class}"
         }
    add_tag => ["exception"]
    }

```

I used that pattern its working fine , but

 ![ssss](https://us1.discourse-cdn.com/elastic/original/3X/2/1/21b9a087621f4d9467fce62a8b69a49b7e405258.png)

I got that, but still I want to parse this line  
`com.twowire.dmc.listener.DeviceInteractionException: 9003: Invalid arguments`

as javaclass, logmessage  
How can I do that I tried with diff patterns not getting  
Any help please?  
Thanks!

---

<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:** [September 5, 2017, 9:48pm UTC](https://discuss.elastic.co/t/grok-patterns-subdivision/96346/2 "2017-09-05T21:48:07Z")

</div>

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