# Parsing jbpm multiline logs

**URL:** <https://discuss.elastic.co/t/parsing-jbpm-multiline-logs/165074>\
**Category:** Logstash\
**Created:** [January 21, 2019, 2:52pm UTC](https://discuss.elastic.co/t/parsing-jbpm-multiline-logs/165074 "2019-01-21T14:52:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdelrahman\_Fahmy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdelrahman_fahmy/32/52811_2.png) [@Abdelrahman\_Fahmy](https://discuss.elastic.co/u/Abdelrahman_Fahmy)\
**Post date:** [January 21, 2019, 2:52pm UTC](https://discuss.elastic.co/t/parsing-jbpm-multiline-logs/165074/1 "2019-01-21T14:52:32Z")

</div>

hi

I am trying to ship my jbpm logs to elasticsearch using logstash. but i am new and i dont know how to create the correct logstash config file  
here is a sample of the logs

> 2019-01-14 05:26:27,979 FINE [com.infosys.finacle.FWI] (Thread-19 (ActiveMQ-client-global-threads-444632928)) childKeys len=1  
> 2019-01-14 05:26:27,979 FINE [com.infosys.finacle.FWI] (Thread-19 (ActiveMQ-client-global-threads-444632928)) Request formed for httpBody is  
> \<ExecuteFCRMCustServiceRequest\>  
> \<ExecuteFCRMCustServiceRq\>  
> \<fiIncidentInfo\>  
> \<businessChannelId\>CRM\</businessChannelId\>  
> \<origVersion\>11.1\</origVersion\>  
> \</fiIncidentInfo\>  
> \<sourceSystem\>JBPM\</sourceSystem\>  
> \<targetSystem\>CRM\</targetSystem\>  
> \<requestType\>CORPCIFAPPROVAL\</requestType\>  
> \<decision\>APPROVE\</decision\>  
> \<mC\_Record\_Status\>AI\</mC\_Record\_Status\>  
> \<corpKey\>1000505\</corpKey\>  
> \</ExecuteFCRMCustServiceRq\>:  
> \</ExecuteFCRMCustServiceRequest\>  
> 2019-01-14 05:26:27,979 FINE [com.infosys.finacle.FWI] (Thread-19 (ActiveMQ-client-global-threads-444632928)) Request formed for request Message is \<?xml version="1.0" encoding="UTF-8"?\>

how can I structure the config file to read the logs and parse it including the multiline logs

---

<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:** [January 21, 2019, 3:21pm UTC](https://discuss.elastic.co/t/parsing-jbpm-multiline-logs/165074/2 "2019-01-21T15:21:38Z")

</div>

I would try something like:

```
input {
    file {
        path => "/path/name.txt"
        sincedb_path => "/dev/null"
        start_position => "beginning" 
        mode => "tail" 
        codec => multiline {
            pattern => "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} "
            negate => true
            what => "previous"
            auto_flush_interval => 1
        }
    }
}
```

---

<div class="post-metadata">

**Author:** ![Abdelrahman\_Fahmy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdelrahman_fahmy/32/52811_2.png) [@Abdelrahman\_Fahmy](https://discuss.elastic.co/u/Abdelrahman_Fahmy)\
**Post date:** [January 23, 2019, 9:53am UTC](https://discuss.elastic.co/t/parsing-jbpm-multiline-logs/165074/3 "2019-01-23T09:53:49Z")

</div>

thanks i used the below and it looks fine

input {  
file {  
type =\> "jbpm"  
path =\> "/logs/\*"  
codec =\> multiline {  
pattern =\> "^%{TIMESTAMP\_ISO8601} "  
negate =\> true  
what =\> "previous"  
}  
start\_position =\> beginning  
sincedb\_path =\> "/dev/null" # for testing; allows reparsing  
add\_field =\> {  
"server" =\> "server1"  
"app" =\> "JBPM"  
}  
}

```
  }

```

filter {  
if [type] == "jbpm" {

```
     grok {
       match => ["message", "(?m)%{TIMESTAMP_ISO8601:timestamp} %{GREEDYDATA:level}\s+\[%{DATA:className}\]%{SPACE}%{GREEDYDATA:message}" ]
       overwrite => ["message"]
          }
                   }
   }
```

---

<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:** [February 20, 2019, 9:53am UTC](https://discuss.elastic.co/t/parsing-jbpm-multiline-logs/165074/4 "2019-02-20T09:53:58Z")

</div>

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