CLI broken since update today

Hi.

I’ve been using InfluxDB under Debian Linux for several months, and I have a script which regularly runs, including the command:

influx -database telegraf -execute “select RTT from mqtt_consumer where RTT>10000”

Since today, this now gives me an error:

Error: unknown shorthand flag: ‘d’ in -database
See ‘influx -h’ for help

The command “influx -h” gives me no clue how I should now be using or expressing the -database and -execute options.

apt-cache policy tells me that I’m now running influxdb 2.0.1, so I’m assuming this means my machine has done an upgrade from 1.8 to 2.0, and this has broken my scripts.

Where can I find the documentation about how I should adjust my script to do what it used to under Influx 1.8?

https://docs.influxdata.com/influxdb/v1.8/tools/influx-cli/ reminds me of how things used to work, and points me at https://docs.influxdata.com/influxdb/v2.0/reference/cli/influx/ for “the equivalent InfluxDB v2.0 documentation”, but it’s not equivalent at all - it doesn’t tell me how to execute a command on a particular database from a script.

So, where do I find the conversion notes on “how to do in 2.0 what you used to do in 1.8”?

Alternatively, which repository can I point at to reinstall 1.8 until I know how to fix this? I’m currently using https://repos.influxdata.com/debian and I don’t find 1.8 in there any more…

Thanks,

Antony.

Hi.

Has no-one else run into this problem as well (either the update in the Debian
package which doesn’t tell you it’s going to break things, or simply the
deliberate upgrade to 2.0, and then wondering “how do I make things work
again?”).

I hope there is some documentation telling previous 1.8 users how to do the
same CLI stuff in 2.0.

Can anyone please kindly point me at it?

Thanks,

Antony.

Phew!

https://repos.influxdata.com/debian now has 1.8.3-1 available again, and a
downgrade to this has restored my CLI functionality :slight_smile:

I’ve now pinned the version of the influxdb package so it won’t upgrade itself
until I know how to do the same CLI stuff in 2.0 as I’m currently (again!)
doing in 1.8.

Hoping someone can still point me at the documentation on how to do this…

Thanks,

Antony.

2 Likes

Yeh things are - in a state of flux - as it were. :thinking:

In all seriousness though, suggest you file a bug report to ensure the right people see it and it can get prioritized

1 Like

Just a note that I encountered the same issue. 2.0 upgrade took me by surprise. I resorted to manually downloading 1.8.3 .deb package and downgrading my install - luckily everything rolled back without a hitch.
I have looked at the 2.0 documentation and while upgrade steps are detailed nicely, I am not looking forward to spending a lot of time upgrading, converting my downsampling CQs and learning flux (while I was just getting the hang of InfluxQL).

So, are you saying that this is now permanently broken, and the Influx CLI
simply can’t be used after an upgrade to 2.0? Or at least, can’t be used to
do the same sort of queries as before?

This is not a complaint against you, nonplus, because you’re obviously
suffering from the same problem as I am. I’m simply replying to your post in
the hope that whoever is responsible for this change will speak up and
answer the question.

In 1.8.3 I do:

influx -database telegraf -execute
"select RTT from mqtt_consumer where RTT>10000"

Where do I find the documentation telling me how to do the same thing in 2.0?

Thanks,

Antony.

Hello @Pooh,
You can use the CLI to query InfluxDB 2.x with InfluxQL (although I recommend just using Flux).