Is it possible to send data to InfluxDB without using xk6 extensions?

,

Hi guys, so the K6 documentation recommends that we use xk6 binary to build k6 with extensions. However, I’m finding it difficult to make this happen due to our corporate proxy. While I did specify proxy variables, it still didn’t allowed the extensions to be installed (i.e. would get 403 status code).

I really like K6 because it’s easy to use and would like to make this work. I remember being able to send my load test results to InfluxDB without xk6, but I can’t seem to find the documentation for that case.

Any advice would be much appreciated! Also, here is the error I get when trying to use xk6 to build k6 with influxdb output extension

go: k6 imports
        github.com/grafana/xk6-output-influxdb imports
        go.k6.io/k6/output imports
        go.k6.io/k6/lib imports
        go.k6.io/k6/loader tested by
        go.k6.io/k6/loader.test imports
        go.k6.io/k6/lib/testutils/httpmultibin imports
        github.com/klauspost/compress/zstd: github.com/klauspost/compress@v1.17.7: reading https://proxy.golang.org/github.com/klauspost/compress/@v/v1.17.7.zip: 403 Forbidden

Hi @beaverbytes !

Welcome to the community forums! :wave:

The short answer to the question is yes it’s possible, but the proper answer is complicated.

Natively (without extensions), for now, k6 supports only metrics output to the InfluxDB v1.

k6 run --out influxdb=http://localhost:8086/k6

InfluxV2 contains a breaking change, and exporting metrics to this metrics backend requires compiling k6 with the extension.

Also, here is the error I get when trying to use xk6 to build k6 with influxdb output extension

Like you said before, it’s likely because of the corporate proxy. How do you set it? Do you use a HTTP_PROXY environment variable?

Hope that answers

Cheers!

Hi @olegbespalov, thanks for the response! I was able to get it to work for InfluxDB v1, which is quite nice, but I do like what v2 offers.

Regarding the proxy, I set the HTTP_PROXY environment variable in my .bashrc file. Not sure if there is another place to set that proxy. I’m also wondering if I need to speak to IT about this as well, though I wouldn’t know what to ask them.