Sending metrics to victoria metrics

Hi, I’m trying to send K6 metrics to my companies victoriametrics storage. There is already a remote write URL available, but doesn’t seem like metrics are being sent over.

Is prometheus.metricsEnabled: true required in order to send the metrics? I already have K6_PROMETHEUS_RW_SERVER_URL set and pointing to the remote write URL. Is there anyway I can enable any logging to see if writing to victoria metrics is failing?

Hi @ryantin !

Welcome to the community forums! :wave:

Is prometheus.metricsEnabled: true required in order to send the metrics?

Is that configuration related to the victoria metrics? If so I’d recommend you to check with their documentation.

I understood that you’re using a k6’s prometheus remote write output. If so the yes, the regular exporting metrics from the k6 looks like

K6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write \
k6 run -o experimental-prometheus-rw script.js

On the k6 side, we do some debug logging while we send metrics, and you could enable displaying those logs by passing the verbose flag to a k6.

Hope that helps.

Cheers!

1 Like

Yes,

Oops sorry, I forgot to mention that I managed to solve this. I was putting int the wrong write URL. Thank you!

1 Like