# Key-value split failing on comma in field

**URL:** <https://discuss.elastic.co/t/key-value-split-failing-on-comma-in-field/355408>\
**Category:** Logstash\
**Created:** [March 14, 2024, 1:52pm UTC](https://discuss.elastic.co/t/key-value-split-failing-on-comma-in-field/355408 "2024-03-14T13:52:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![e.vedelaar](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@e.vedelaar](https://discuss.elastic.co/u/e.vedelaar)\
**Post date:** [March 14, 2024, 1:52pm UTC](https://discuss.elastic.co/t/key-value-split-failing-on-comma-in-field/355408/1 "2024-03-14T13:52:31Z")

</div>

When ingesting fortigate logs i come across the following error message:

field [syslog5424\_sd] does not contain value\_split [=]

this occurs because i do KV splits on ",". While this works with most logs, there are a few which are giving errors. One of the logs which is failing contains the following field: _srccountry="Korea, Republic of"_. Because there is an comma in between Korea and Republic of, the pipeline fails.

Is there a way of either ignoring or removing the comma in these fields?

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [March 14, 2024, 2:36pm UTC](https://discuss.elastic.co/t/key-value-split-failing-on-comma-in-field/355408/2 "2024-03-14T14:36:12Z")

</div>

Before suggest something tested and working, can you put a full message?

There is possibility to handle with:

- whitespace =\> strict
- trim\_value =\> '"'
- remove\_char\_value =\> '"' or "["]"
- value\_split\_pattern -improve split with regex patern  
etc.

---

<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:** [April 11, 2024, 2:36pm UTC](https://discuss.elastic.co/t/key-value-split-failing-on-comma-in-field/355408/3 "2024-04-11T14:36:56Z")

</div>

Closed on April 11, 2024, 2:36pm UTC

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