# Metric data from csv

**URL:** <https://discuss.elastic.co/t/metric-data-from-csv/291314>\
**Category:** Logstash\
**Created:** [December 9, 2021, 10:59am UTC](https://discuss.elastic.co/t/metric-data-from-csv/291314 "2021-12-09T10:59:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirReeall](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sirreeall/32/94713_2.png) [@sirReeall](https://discuss.elastic.co/u/sirReeall)\
**Post date:** [December 9, 2021, 10:59am UTC](https://discuss.elastic.co/t/metric-data-from-csv/291314/1 "2021-12-09T10:59:38Z")

</div>

Hello,

I'm trying to import metrics data from a CSV file. Currently I'm using a csv filter like:

```auto
filter {
    csv {
        autodetect_column_names => true
    }
    date {
      match => ["[t]","UNIX"]
    }
    mutate {
      remove_field => ["t"]
    }
}

```

The data gets to Elastic fine and I can see the documents when I use Kibana -\> Analytics -\> Discover.

How do I get these documents to work in Kibana -\> Observability -\> Metrics?

(Thinking while I'm typing this might be a question for another forum)

---

<div class="post-metadata">

**Author:** ![sirReeall](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sirreeall/32/94713_2.png) [@sirReeall](https://discuss.elastic.co/u/sirReeall)\
**Post date:** [December 9, 2021, 2:52pm UTC](https://discuss.elastic.co/t/metric-data-from-csv/291314/2 "2021-12-09T14:52:11Z")

</div>

Managed to figure this out 🙂

I used the following in my output filter:

```auto
output {
  elasticsearch {
      hosts => "elastic"
      data_stream => "true"
      data_stream_type => "metrics"
  }
}

```

That did add another index prefixed with `metric". This index can be used in metrics explorer.

---

<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 6, 2022, 2:52pm UTC](https://discuss.elastic.co/t/metric-data-from-csv/291314/3 "2022-01-06T14:52:34Z")

</div>

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