# Multiline and csv filter

**URL:** <https://discuss.elastic.co/t/multiline-and-csv-filter/267888>\
**Category:** Logstash\
**Created:** [March 20, 2021, 1:54pm UTC](https://discuss.elastic.co/t/multiline-and-csv-filter/267888 "2021-03-20T13:54:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincedt09](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincedt09/32/85366_2.png) [@vincedt09](https://discuss.elastic.co/u/vincedt09)\
**Post date:** [March 20, 2021, 1:54pm UTC](https://discuss.elastic.co/t/multiline-and-csv-filter/267888/1 "2021-03-20T13:54:53Z")

</div>

Hi!

I want to visualize in kibana map geo points with specific information(ex: latitude, longitude)

```
csv {

        separator => ","

        skip_empty_rows => true

        columns => ["latitude","longitude"]

    }

    mutate {

        convert => ["latitude", "float"]

        convert => ["longitude", "float"]

        remove_field => ["@version", "path", "host"]

    }

    mutate {

        add_field => {

            "link_point" => "%{latitude},%{longitude}"

        }

}

```

Something like this:

 ![Untitled](https://us1.discourse-cdn.com/elastic/original/3X/8/d/8db2184260b75da8f09091d4ab6764f1633f90b8.png)

Between this points I will draw a line( first to second, second to third, third to forth) and it will look like this:

```
file {

        sincedb_path => "NUL"

        start_position => "beginning"

        codec => multiline {           

            pattern => " "

            what => previous

            negate => true

            auto_flush_interval => 2

        }

    }

ruby {

            code => '

                m = event.get("message").split 

                m.shift

                a = []

                m.each { |x|

                    x = x.split(",")

                    x[0] = x[0].to_f

                    x[1] = x[1].to_f

                    a << x

                }

                event.set("[link_line][coordinates]", a)

            '

        }

```

 ![Untitled1](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1c4ef49983a7f8839aec1056968c9b277c682ce7.png)

The problem is that due to codec multiline my program get stuck. If I remove the codec multiline the geo points in kibana will look like in the first case.

After a few searches I found out that codec multiline don't work with csv filter. I tried with dissect and gork but I failed  
Is there any solution for this problem?

Thanks,  
Vince

---

<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 17, 2021, 1:55pm UTC](https://discuss.elastic.co/t/multiline-and-csv-filter/267888/2 "2021-04-17T13:55:24Z")

</div>

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