# How to dissect uneven space in log with filebeat processors

**URL:** https://discuss.elastic.co/t/how-to-dissect-uneven-space-in-log-with-filebeat-processors/320609
**Category:** Beats
**Tags:** filebeat
**Created:** [December 6, 2022, 4:03pm UTC](https://discuss.elastic.co/t/how-to-dissect-uneven-space-in-log-with-filebeat-processors/320609 "2022-12-06T16:03:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![amir\_Bialek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amir_bialek/32/109973_2.png) [@amir\_Bialek](https://discuss.elastic.co/u/amir_Bialek)
#### Post date: [December 6, 2022, 4:03pm UTC](https://discuss.elastic.co/t/how-to-dissect-uneven-space-in-log-with-filebeat-processors/320609/1 "2022-12-06T16:03:31Z")

</div>

Hey all, I have a python microservice that output logs like so:

```auto
INFO ; 2022-12-02 01:30:00; bla bla bla...
DEBUG ; 2022-12-02 01:30:00; bla bla bla...

```

Note how the space is different on the loglevel.  
I am parsing it like so:

```auto
                    - dissect:
                        tokenizer: "%{log.level} ;%{+timestamp} ; %{?message}"
                        field: "message"
                        target_prefix: ""

```

Which work for the first line, not the second.  
Anyone know if there is a solution for such case?

Thank you.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [December 6, 2022, 6:48pm UTC](https://discuss.elastic.co/t/how-to-dissect-uneven-space-in-log-with-filebeat-processors/320609/2 "2022-12-06T18:48:53Z")

</div>

Hi @amir_Bialek

Think you want to look at the more detailed docs on dissect.  
This is from the ingest processor but I am pretty sure all the syntax holds true

[Skip right padding](https://www.elastic.co/guide/en/elasticsearch/reference/master/dissect-processor.html#dissect-modifier-skip-right-padding)

`->` Skip right padding (far) right `%{keyname1->}` Skips any repeated characters to the right [link](https://www.elastic.co/guide/en/elasticsearch/reference/master/dissect-processor.html#dissect-modifier-skip-right-padding)

So perhaps something like BTW you have a space after the `;` you need to account for

`tokenizer: "%{log.level->}; %{+timestamp}; %{?message}"`

---

<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: [January 3, 2023, 8:49pm UTC](https://discuss.elastic.co/t/how-to-dissect-uneven-space-in-log-with-filebeat-processors/320609/3 "2023-01-03T20:49:03Z")

</div>

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