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?

influx - InfluxDB command line interface | InfluxDB OSS 1.8 Documentation reminds me of how things used to work, and points me at influx - InfluxDB command line interface | InfluxDB OSS 2.0 Documentation 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 InfluxDB - Package Repository 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!

InfluxDB - Package Repository 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).

Is the expectation that either InfluxQL is getting deprecated and/or the command-line tool will no longer support interactive sessions? I use the heck out of CLI sessions when testing, troubleshooting, or experimenting around and it was a huge shock to see it working completely different. SQL style querying is something I still have to do on a regular basis but even with learning flux, having an interactive client sure makes things easier and I might argue as nice as Flux may be, IQL makes for an excellent way to have folks learn about Influx. It was honestly the defining feature for me when choosing which timeseries DB to try.

Hello @m00dawg,
InfluxQL isn’t getting deprecated. In fact InfluxQL and SQL will be supported out of the box in the future. Read all about it:

1 Like

Oh wow!!! That’s what I was looking for. The InfluxDB 2.0 docs kinda just cursory mentioned InfluxQL and my Googling and DuckDuckGo’ing clearly failed to find this article. Very exciting stuff, thanks for sharing this! Seems there is a lot to look forward to!

1 Like

@m00dawg I’m excited too!