Not being able to use influxdb client V2

Hi,

I have set up the influxdb docker container on port 8086. I also installed the CLI, which is not a stable version:
$ influx version
Influx CLI dev (git: none) build_date: 2023-04-28T14:24:14Z
The problem is that I can’t access the CLI, when I type “influx”:
$ influx
NAME:
influx - Influx Client

USAGE:
influx [command]

HINT: If you are looking for the InfluxQL shell from 1.x, run “influx v1 shell”

I also tried it inside the docker container, but the same problem happens. Is this problem caused by this version of influxdb? Should I install another version? I would appreciate it if you would let me know how to proceed asap! Thank you!

Hello @Zahra_Rahmani,
The CLI of InfluxDB 2.x has significant changes compared to the 1.x CLI.
I’m not sure you can use the 1.x CLI with 2.x.

What are you trying to do ultimately?
If you want to use influxQL with 2.x look at

Youll have to do some significant setup work first. And then use the 2.x CLI

Hi @Anaisdg ,
Thank you for getting back to me. I am creating a virtual environment initially using docker containers locally on my machine. Then I have to take it to the HPC and run it there in larger scales. The scenario is as follows: I am running a small program inside the docker container; in order to measure the performance, I should create multiple samples of containers with different resources (cpu usage, memory, cache) and let them run to see the performance. I also have installed ganglia monitoring system for instrumenting the environment. The goal is to write the data collected by the ganglia (or Prometheus) to a time series database such as influxdb and then process and parse that data for machine learning model training.

Since I will take the environment to the HPC, I would like to run them with singularity module. For the above scenario, I am thinking of creating a singularity network ( similar to docker network), but singularity doesn’t seem to have a network option. My containers include my program, influxdb, and ganglia. I need to get them to communicate well!

For influxdb CLI, I haven’t been able to make it work for V 2x. However, I have set up the API and authentication and my script for writing to influxdb works fine. Do I need to asetup the 2.x CLI at this point? How do I do that? I would appreciate it if you would comment on my scenario and how to set up the CLI.

Thank you!