# Log4j in integration with logstash

**URL:** https://discuss.elastic.co/t/log4j-in-integration-with-logstash/55333
**Category:** Logstash
**Created:** [July 12, 2016, 4:20pm UTC](https://discuss.elastic.co/t/log4j-in-integration-with-logstash/55333 "2016-07-12T16:20:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pavana](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@pavana](https://discuss.elastic.co/u/pavana)
#### Post date: [July 12, 2016, 4:20pm UTC](https://discuss.elastic.co/t/log4j-in-integration-with-logstash/55333/1 "2016-07-12T16:20:03Z")

</div>

Is it possible to configure the data in message field in logged data. For example , I want to give data in message field while logging, whose logfield is INFO as shown below.

2016-06-16 INFO [main] (ElkSampleApp.java:20) - Airtel,500060,1000,$500

The above one is the log that is generated. Now when this is parsed to kibana it splits all the fields as shown below.

message: Airtel,500060,1000,$500 @version:1 @timestamp:July 12th 2016, 21:08:53.987 timestamp:1468337933955 path:ElkSampleApp priority:DEBUG logger\_name:ElkSampleApp thread:main class:? file:?:? method:? application:playground host:127.0.0.1:59524 type:log4j \_id:AVXfwtGVXesdkliHqf6S \_type:log4j \_index:logstash-2016.07.12 \_score:

My message field has 4 sub-fields. "Airtel" representing "servicename", "500060" representing "pincode","1000" representing "number\_of\_users" and "$500" representing "profit". But these fields do not appear in kibana. Because the data in message field was not split. It takes the whole message as it is. Is there any chance to split or configure the data present in message field? If yes, then how can i do it?

---

<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: [July 12, 2016, 7:49pm UTC](https://discuss.elastic.co/t/log4j-in-integration-with-logstash/55333/2 "2016-07-12T19:49:54Z")

</div>

You can e.g. use the csv filter to split the `message` field.

---

<div class="post-metadata">

### Author: ![pavana](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@pavana](https://discuss.elastic.co/u/pavana)
#### Post date: [July 13, 2016, 10:18am UTC](https://discuss.elastic.co/t/log4j-in-integration-with-logstash/55333/3 "2016-07-13T10:18:14Z")

</div>

Thank you so much. I am very new to elk. This was very helpful.

---

<div class="post-metadata">

### Author: ![pavana](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@pavana](https://discuss.elastic.co/u/pavana)
#### Post date: [July 13, 2016, 10:55am UTC](https://discuss.elastic.co/t/log4j-in-integration-with-logstash/55333/4 "2016-07-13T10:55:33Z")

</div>

Also can you please help me with kibana. How should i search for data which has both Airtel as service name and $5000 as profit. If i am typing "Airtel"&"$5000" i am getting all the data that has Airtel or $5000 but i want data which has Airtel AND $5000 (i.e intersection of both fields).

---

<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: [July 13, 2016, 1:39pm UTC](https://discuss.elastic.co/t/log4j-in-integration-with-logstash/55333/5 "2016-07-13T13:39:16Z")

</div>

Please start a new thread in the Kibana category for your Kibana question.

---

<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, 4:48am UTC](https://discuss.elastic.co/t/log4j-in-integration-with-logstash/55333/6 "2017-07-06T04:48:14Z")

</div>


