ERRO[0001] could not create the ‘xk6-influxdb’ output: the Bucket option is required
I tried to
K6_INFLUXDB_BUCKET=testBucket ./k6 run -o xk6-influxdb=http://localhost:8086 script.js
K6_INFLUXDB_BUCKET= : The term ‘K6_INFLUXDB_BUCKET=’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
Thank you folks, literally the only spot that explains the use of environment variables for us poor windows users. I used the following in powershell, will turn into a PS script.
PS C:\Windows\system32> $env:K6_INFLUXDB_BUCKET=“MyBucket”
PS C:\Windows\system32> $env:K6_INFLUXDB_ORGANIZATION=“MyOrg”
PS C:\Windows\system32> $env:K6_INFLUXDB_TOKEN=“API token generated in InfluxDB UI”
PS C:\Windows\system32>> $env:K6_INFLUXDB_PUSH_INTERVAL=“2”
PS C:\Windows\system32> Set-Location -Path “My Path to Script”
PS C:>My Path to Script>
PS C:>./k6 run -o xk6-influxdb=http://localhost:8086 simple_loop.js