# The padding isn't handled correctly

**URL:** https://discuss.elastic.co/t/the-padding-isnt-handled-correctly/191768
**Category:** Beats
**Tags:** filebeat
**Created:** [July 23, 2019, 8:49am UTC](https://discuss.elastic.co/t/the-padding-isnt-handled-correctly/191768 "2019-07-23T08:49:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alexott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexott/32/9219_2.png) [@alexott](https://discuss.elastic.co/u/alexott)
#### Post date: [July 23, 2019, 8:49am UTC](https://discuss.elastic.co/t/the-padding-isnt-handled-correctly/191768/1 "2019-07-23T08:49:42Z")

</div>

It almost the same question as in [Dissect filter not removing whitespace padding via suffix "-\>"](https://discuss.elastic.co/t/dissect-filter-not-removing-whitespace-padding-via-suffix/161233)

Per [documentation](https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html) we should handle padding on the right by adding `->` to the field name.

I have following pattern to parse Cassandra logs:

```auto
tokenizer: "%{level->} [%{thread}] %{ts} %{+ts} %{service} %{file}:%{line} - %{msg}"

```

and expected that I'll get `level` as `INFO` when parsing following line:

```auto
INFO [AntiEntropyStage:1] 2019-06-21 10:21:49,830 RepairSession.java:180 - [repair #9dd08c14-93fd-11e9-90ba-47892c9923e3] Re...

```

But instead I'm getting the "`INFO`" - with space character not stripped...

According to the [source code](https://github.com/elastic/beats/blob/master/libbeat/processors/dissect/dissect.go#L104) it should be handled correctly, but I just want to check before filing a bug against libbeats

---

<div class="post-metadata">

### Author: ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)
#### Post date: [July 25, 2019, 6:25pm UTC](https://discuss.elastic.co/t/the-padding-isnt-handled-correctly/191768/2 "2019-07-25T18:25:51Z")

</div>

Hello @alexott,  
This look like a bug to me, can you file an issue on the beat repo, you can ping me there. I will take a look.

---

<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: [August 22, 2019, 6:25pm UTC](https://discuss.elastic.co/t/the-padding-isnt-handled-correctly/191768/3 "2019-08-22T18:25:58Z")

</div>

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