influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

passing data via stdin does not work anymore after update to 2.4.0

Open HolgerHees opened this issue 3 years ago • 1 comments
trafficstars

with version 2.3.0 I was able to import a flux script like

cat downsampling_opentsdb_090d.flux |> influx task create --org default-org

after updating to version 2.4.0, I'm getting the error message

Error: 400 Bad Request: failed to decode request: missing flux

but I'm still able to import the same script with

influx task create --org default-org -f downsampling_opentsdb_090d.flux

This means that the script itself works and is not the root cause for this issues. For me it looks like the stdin is not used anymore.


In my usecase I piped a file into a docker container

cat /dataDisk/build/influxdb/downsampling_opentsdb_090d.flux | docker exec -i influxdb sh -c "influx task create --org default-org"

which does not work anymore. My workaround for now, using a tmp file inside the container, is

cat /dataDisk/build/influxdb/downsampling_opentsdb_090d.flux | docker exec -i influxdb sh -c "cat > tmp.flux && influx task create --org default-org -f tmp.flux"

best

HolgerHees avatar Aug 25 '22 08:08 HolgerHees

I'm encountering this problem as well. Annoying as I just wanted to write a shell script with heredocs

cycloss avatar Sep 14 '22 12:09 cycloss