I installed k6 v0.35.0, go 1.17.3, xk6@latest, Prometheus 2.32.0-beta.0, xk6-output-prometheus-remote@latest, and try to run k6 script, but I got below error:
I want to know whether k6 open source can save test result in Prometheus?
I installed k6 v0.35.0, go 1.17.3, xk6@latest, Prometheus 2.32.0-beta.0, xk6-output-prometheus-remote@latest, and try to run k6 script, but I got below error:
I want to know whether k6 open source can save test result in Prometheus?
You are trying to execute a command with syntax used in Linux/POSIX shells in Microsoft's PowerShell. PowerShell uses different syntax to set environment variables for commands.
To set an environment variable in PowerShell, you have to execute a separate command before running your actual command.
$env:K6_PROMETHEUS_REMOTE_URL = 'http://172.21.2.29:9090/api/v1/write'
./k6 run main_smoke_test.js -o output-prometheus-remote
Alternatively, you can install Git Bash to have a POSIX compatible shell available.