Can not connect to Remote InfluxDB

I run the script k6 run --out influxdb=http://[ip]:8086/k6db apitest.js

The error was reported ERRO[0004] Couldn’t write stats error="{“error”:“unable to parse authentication credentials”}\n" output=InfluxDBv1

Hello @bobobkb,

which InfluxDB version are you using? Seems InfluxDB is asking for credentials, are you passing them using the available options?

Thanks @codebien ,can you give me an example of how to use the available options?

Hello @bobobkb,

you can find more details about how to use the options and different available ways to set them reading this documentation’s section.

If you are using a Unix-like OS, then in your case, an example could be similar to this:

K6_INFLUXDB_USERNAME=your-user-here K6_INFLUXDB_PASSWORD=your-password-here k6 run --out influxdb=http://localhost:8086/k6db apitest.js

Which InfluxDB version are you using? Currently, k6 doesn’t support InfluxDB v2.x so you should check that you are using InfluxDB v1.x.