Promql query for k6_vus_max

  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?
    Trying to build a dashboard

  • How are you trying to achieve it?
    Get the data from the Prometheus and build the dashboard

  • What happened?
    With my earlier implementation with InfluxDB 1x It’s very straight forward by running the below query i can achieve it.

SELECT “App” as “Application”, “Env” as “Environment”, “Type” as “Type”, LAST(“value”) as “Total VUsers” FROM “vus_max” GROUP BY (“testid”) ORDER BY time DESC

I new to promQL and I tried different queries but not working. Don’t no how to represent it.

Need a similar output using promQL query

  • Can you copy/paste the configuration(s) that you are having problems with?

(k6_vus_max{Envi!=“”, TType!=“”, RunID!=“”})

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

Hello @gerardlj

We are missing some information here… Could you please share what your database looks like with PromQL?

Also, Prometheus and InfluxDB are not the same; there’s not really an equivalence…
You can try something like:

max_over_time(vus_max{job="testid"}[1h]) by (Application, Environment, Type)

If this doesn’t work, my knowledge of Prometheus will not permit me to help you further. :neutral_face:


when i try the above query it wont returns anything. Instead

avg(k6_vus_max) by (RunID)

it returns this

any other options to get the other columns like Application name, Type and Environment