Help with data aggregation

Hi i monitor my web application with Grafana / Influx 2.x

The flow is as following:

  1. Application has a prometheus metrics endpoints
  2. Telegraf read the data and puts it into influxdb 2.x
  3. grafana queries influx.

because how it is set up, when i query the raw data in Influxdb, i get a stream of tables (~900), one for every label value permutation.

what i actually need: just one resulting table, where the values per time stamp are added.
should i configure telegraf differently?

[[inputs.prometheus]]
urls = [
http://frontend:80/metrics”,
]
metric_version = 2
name_override = “frontend”
or have i issues in my query?
best would be a solution for grafana (where these data streams lead to 900 vales per timestamp)

@maya-mdolling The data is being written correctly, you just need to update your query in a way that the UI doesn’t allow for. Switch to the Script Editor mode and add the following to your query. This changes the structure of the data in a way that the InfluxDB UI won’t be able to display it, but it should match what you’re looking for:

// The rest of your query here
    |> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value")

hey thx for the reply. unfortunately this gives me a time x time graph =(

see answer below. just saw the reply button here