grafana / k6

A modern load testing tool, using Go and JavaScript - https://k6.io
GNU Affero General Public License v3.0
25.04k stars 1.24k forks source link

K6 is unable to send the data to influxdb #1883

Closed subhendu-de closed 3 years ago

subhendu-de commented 3 years ago

Scenario

Running a basic k6 test and send the test output to influxdb. Both the k6 and influxdb are running in docker container.

Artifacts

The docker-compose file is located here at https://github.com/subhendu-de/k6-demo/blob/dev/docker-compose.yml The script file is located here at https://github.com/subhendu-de/k6-demo/blob/dev/scripts/loadtest1.js Please change the test url accordingly.

Issue

Please note I can access the influxdb ui while the container is up and running.

Any help is really appreciated to guide me why the k6 container is unable to send the data to influxdb instance running in a container.

imiric commented 3 years ago

Hi, this is a problem with InfluxDB v2, which the latest tag on Docker Hub points to. If you pin the image version to influxdb:1.8 it should work.

Unfortunately the client library k6 uses right now is incompatible with v2, which we plan to update soon. See #1730.

subhendu-de commented 3 years ago

Thanks @imiric! I took the 1.8 tagged image and good to setup now. Can I raise a PR to update the tag from latest to 1.8? The documentation here may create issue until #1730 is resolved. Else may be a small note in the documentation stating about this issue.

imiric commented 3 years ago

Sure, feel free to create that PR @subhendu-de. We eventually plan to move the docker-compose.yml to a separate repo, but in the meantime it would be good to have this version pinned.

dev-vinicius-andrade commented 3 years ago

Is there any news regarding this support?

na-- commented 3 years ago

The official k6 binary still doesn't support InfluxDB v2, that would hopefully come in k6 v0.32.0. However, as you can see in the linked issue, someone created an output extension for it, so that might work for you until then, if downgrading to InfluxDB 1.8 is not an option: https://github.com/loadimpact/k6/issues/1730#issuecomment-797360302