My question about docker is limited. What I am trying to do it
- run the K6 load test in the docker container 2)save the results in influxdb
- create custom dashboards in grafana
My K6 script is ready. I downloaded docker desktop on my windows OS, pulled images of Influx DB 1.8(which is compatible with K6), grafana 3)loadimpact/k6
When I give the following command,
docker run -v //c/loadtesting:/src -i loadimpact/k6 run --out influxdb=http://localhost:8086/myk6db /src/K6-script.js
My loadtest runs fine but I receive following error at each api call:
time="2021-10-16T16:32:09Z" level=error msg="Couldn't write stats" error="Post \"http://localhost:8086/write?consistency=&db=myk6db&precision=ns&rp=\": dial tcp 127.0.0.1:8086: connect: connection refused" output=InfluxDBv1
On the docker container, the influxdb is running on port 8086 but since it's version 1.8, there is no web interface attached to it. ( I believe it is available for higher versions).
How do I make my script results output to influxdb database myk6db?