K6 Docker Stats on Grafana

Hi Team,

I need to find out to capture the performance stats on my K6 docker during the execution. I checked the Influxdb measurements specific to K6 docker CPU and memory, didn’t find anything. Is there is way to capture.

One of the github repo maintain by @nicole have the below code.

Can some one guide me to setup a grafana panel to show the below metrics.

My current setup K6 docker, InfluxDB 1.8 and Grafana.

Hi Sheron! That code was in the context of running a test on k6 Cloud, where thresholds can be set for the CPU and memory utilisation of load generator instances. It sounds like you’re not using k6 Cloud, so the lines you quoted wouldn’t be relevant for you.

@javaducky recently demonstrated a dockerized setup with InfluxDB + Grafana - more information here. Grafana dashboards are not set within k6 scripts, so if you want more custom dashboards, you will need to modify them or create new panels yourself. However, they are a one-time cost, as you should be able to reuse those dashboards once you’ve got them looking the way you want them to.

You can find more information about how to set up dashboards in the Grafana documentation.

1 Like