Writing k6 outputs to Victoria Metrics

I’m using Victoria Metrics as a metric storage. I would like to use VM rather than using InfluxDB

In this case I just port forwarded to my VM port then run;

k6 run --out influxdb= click_performancetest.js --http-debug="full"

However when I do it, getting this;

requestURI: /write?consistency=&db=k6&precision=ns&rp=; cannot parse path “/write”: cannot find {prefix}\n" output=InfluxDBv1

Is there any blog, article or suggestion for using Victoria metrics using k6 with rather than using InfluxDB?

Thanks in advance

Hi @berkaykirmizioglu,

I don’t know anything about Victoria Metrics, but I did see from their site they support metrics in InfluxDB. There have been some issues around the built-in InfluxDB support within core k6; I’d suggest building k6 with the xk6-output-influxdb extension which has support for InfluxDBv2.

See Build a k6 binary with extensions about building custom k6 binaries with xk6.

Hope this helps!

1 Like

Hi @berkaykirmizioglu, Welcome to the community forum!

What @javaducky said might help you, but I would argue this might’ve been better question of victoira metrics issues (that is where they seem to answer questions) as this is error they are returning.

Looking at the stackoverflow question (you likely asked as well), the CTO of victoria metrics has answered himself that you likely are using the wrong URL.

I have no idea if this is right, but if it is I wanted to link it from here as well for people trying to figure this out in the future.

1 Like