# Log parsing - ampersand getting transformed to \\u0026

**URL:** <https://discuss.elastic.co/t/log-parsing-ampersand-getting-transformed-to-u0026/98453>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 26, 2017, 12:33pm UTC](https://discuss.elastic.co/t/log-parsing-ampersand-getting-transformed-to-u0026/98453 "2017-08-26T12:33:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raskin](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@raskin](https://discuss.elastic.co/u/raskin)\
**Post date:** [August 26, 2017, 12:33pm UTC](https://discuss.elastic.co/t/log-parsing-ampersand-getting-transformed-to-u0026/98453/1 "2017-08-26T12:33:29Z")

</div>

Hi Team,  
We were using filebeat 2.x for quite long time. Recently we decided to upgrade to 5.5 version of ELK stack along with kafka.

Filebeat -\> Kafka-cluster -\> logstash -\> ES -\> Kibana

We are able to successfully configure the cluster and logs are flowing as expected.

Original log on the disk -  
2017-07-24 00:00:17,865 INFO [GlobalWebRedirectServlet] (ajp-/0.0.0.0:8009-199) Server ID: estore2a, Ip 173.239.240.38 -- [ca.xxx.com/store/services/stibo/stiboLiteOrderingTable.jsp?orderGridID=orderTable\_CAAAA13466-0B&catalogNumbers=CAAAA13466-0B,CAAAA13466-30,CAAAA13466-0I&initLoad=false&itemCount=3&\_=1500868818879](http://ca.xxx.com/store/services/stibo/stiboLiteOrderingTable.jsp?orderGridID=orderTable_CAAAA13466-0B&catalogNumbers=CAAAA13466-0B,CAAAA13466-30,CAAAA13466-0I&initLoad=false&itemCount=3&_=1500868818879) - User Org Id : u920480552canada\_cash\_org - Is Anonymous : true - Client SSL Protocol: TLSv1.2 - Client SSL Cipher : ECDHE-ECDSA-AES128-GCM-SHA256

Output by filebeat -  
{"@timestamp":"2017-08-26T12:09:11.355Z","beat":{"hostname":"lxelkprd01","name":"lxelkprd01","version":"5.5.0"},"input\_type":"log","message":"2017-07-24 00:00:17,865 INFO [GlobalWebRedirectServlet] (ajp-/0.0.0.0:8009-199) Server ID: estore2a, Ip 173.239.240.38 -- [ca.vwr.com/store/services/stibo/stiboLiteOrderingTable.jsp?orderGridID=orderTable\_CAAAA13466-0B\u0026catalogNumbers=CAAAA13466-0B,CAAAA13466-30,CAAAA13466-0I\u0026initLoad=false\*\*\u0026](http://ca.vwr.com/store/services/stibo/stiboLiteOrderingTable.jsp?orderGridID=orderTable_CAAAA13466-0B%5Cu0026catalogNumbers=CAAAA13466-0B,CAAAA13466-30,CAAAA13466-0I%5Cu0026initLoad=false**%5Cu0026)**itemCount=3**\u0026\*\*\_=1500868818879 - User Org Id : u920480552canada\_cash\_org - Is Anonymous : true - Client SSL Protocol: TLSv1.2 - Client SSL Cipher : ECDHE-ECDSA-AES128-GCM-SHA256","offset":485,"source":"/apps/elk/testsetup/test6.log","type":"log"}

I am seeing & is getting transformed to \u0026. I tried couple of encodings however I am not able to find any solution that works. I believe it has to do with HTML escaping and I saw some suggestions about using JSON. However this is log from server and not in JSON format.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 28, 2017, 2:40pm UTC](https://discuss.elastic.co/t/log-parsing-ampersand-getting-transformed-to-u0026/98453/2 "2017-08-28T14:40:46Z")

</div>

Can you try with beats 6.0 beta? The encoding for 6.0 has been redone and might give you the expected results (I hope).

---

<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 25, 2017, 2:40pm UTC](https://discuss.elastic.co/t/log-parsing-ampersand-getting-transformed-to-u0026/98453/3 "2017-09-25T14:40:48Z")

</div>

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