# Corrupted messages when using PGSQL protocol

**URL:** <https://discuss.elastic.co/t/corrupted-messages-when-using-pgsql-protocol/134051>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [May 31, 2018, 12:53pm UTC](https://discuss.elastic.co/t/corrupted-messages-when-using-pgsql-protocol/134051 "2018-05-31T12:53:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kauf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kauf/32/31781_2.png) [@kauf](https://discuss.elastic.co/u/kauf)\
**Post date:** [May 31, 2018, 12:53pm UTC](https://discuss.elastic.co/t/corrupted-messages-when-using-pgsql-protocol/134051/1 "2018-05-31T12:53:29Z")

</div>

We are using packetbeat version 6.2.4 to log all SQL requests.  
The relevant part of configuration is:

```auto
packetbeat.flows:
  enabled: false

packetbeat.protocols:
- type: pgsql
  ports: [5432]
  send_request: true
  send_response: false

```

Those requests are logged and we can see them using kibana.  
The problem is that every message containing character `;` is corrupted.  
That means data after this `;` are dropped.  
I think there's a problem with packetbeat which thinks that there are more than one SQL statements and tries to create document for every of them.  
for example:

```auto
(samsung SM-G950F; OS Android 8.0.0, api 26, base: ; pol)

```

get's logged as:

```auto
(samsung SM-G950F

```

the rest of message is lost.

Is there any way this can be mitigated?  
If not should I create bug report on GITHUB?

Thank you

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [May 31, 2018, 10:21pm UTC](https://discuss.elastic.co/t/corrupted-messages-when-using-pgsql-protocol/134051/2 "2018-05-31T22:21:52Z")

</div>

Hi @kauf,

Thank you for your feedback! This looks a lot like a bug, I think it would be best if you create a new issue: [https://github.com/elastic/beats/issues/new](https://github.com/elastic/beats/issues/new)

Best regards

---

<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:** [June 28, 2018, 10:21pm UTC](https://discuss.elastic.co/t/corrupted-messages-when-using-pgsql-protocol/134051/3 "2018-06-28T22:21:53Z")

</div>

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