# Scraping and storing prometheus app metrics into influx

**URL:** <https://community.influxdata.com/t/scraping-and-storing-prometheus-app-metrics-into-influx/14545>\
**Category:** Telegraf\
**Tags:** telegraf, prometheus\
**Created:** [May 28, 2020, 4:19am UTC](https://community.influxdata.com/t/scraping-and-storing-prometheus-app-metrics-into-influx/14545 "2020-05-28T04:19:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsreeni](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@rsreeni](https://community.influxdata.com/u/rsreeni)\
**Post date:** [May 28, 2020, 4:19am UTC](https://community.influxdata.com/t/scraping-and-storing-prometheus-app-metrics-into-influx/14545/1 "2020-05-28T04:19:44Z")

</div>

Hi,

We have Telegraf running as a pod scraping prometheus metrics from our application Pods. We have our inputs configured as

> [[inputs.prometheus]]  
> name\_prefix = “apps\_”  
> urls =   
> metric\_version = 2  
> monitor\_kubernetes\_pods = true  
> [[outputs.influxdb]]  
> timeout = “15s”  
> namepass = [“apps\_\*”]  
> database = “apps”  
> retention\_policy = “14d”  
> urls = [“{influxdb-url}:8086”]  
> username = “username”  
> password = “password”  
> When the data gets into the influx, we end up with only one single measurement, no tags and all the labels end up as fields…

Is it how it is supposed to be interpreted ?

The series cardinality is 285484…

thanks,

-Sreeni

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [June 1, 2020, 8:13pm UTC](https://community.influxdata.com/t/scraping-and-storing-prometheus-app-metrics-into-influx/14545/2 "2020-06-01T20:13:18Z")

</div>

With `metric_version = 2` set all metrics will be reported to one measurement by default, all labels are reported as tags, and the Prometheus metric name is the field key.

---

<div class="post-metadata">

**Author:** ![rsreeni](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@rsreeni](https://community.influxdata.com/u/rsreeni)\
**Post date:** [June 2, 2020, 3:44pm UTC](https://community.influxdata.com/t/scraping-and-storing-prometheus-app-metrics-into-influx/14545/3 "2020-06-02T15:44:20Z")

</div>

Thanks a lot @daniel !! So, is the high series cardinality to be expected and normal ?

-Sreeni

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [June 4, 2020, 9:38pm UTC](https://community.influxdata.com/t/scraping-and-storing-prometheus-app-metrics-into-influx/14545/4 "2020-06-04T21:38:22Z")

</div>

The cardinality is going to depend on the number of unique tag/label combinations, so I can’t say for sure if what you are seeing is normal for your usage. If you feel like this is more than expected you will probably have to dive in to the actual values. As a bare minimum you are going to see one series per metric name.
