Documentation

influxctl

The influxctl command line interface (CLI) writes to, queries, and performs administrative tasks in an InfluxDB Cloud Dedicated cluster.

Usage

influxctl [global-flags] [command]

Commands

CommandDescription
authLog in to or log out of InfluxDB v3
clusterList InfluxDB v3 cluster information
databaseManage InfluxDB v3 databases
helpOutput influxctl help information
managementManage InfluxDB v3 management tokens
queryQuery data from InfluxDB v3
tokenManage InfluxDB v3 database tokens
userManage InfluxDB v3 cluster users
versionOutput the current influxctl version
writeWrite line protocol to InfluxDB v3

Global flags

FlagDescription
--debugEnable debug logging
--accountOverride account ID value in configuration file
--clusterOverride cluster ID value in configuration file
--configPath to configuration file to use
--profileSpecify a connection profile to use (default is default)
--timeoutSpecify a timeout duration for API calls (default is 1m0s)
--traceEnable more verbose debug logging
-h--helpShow help

Download and install influxctl

Use one of the following options to download and install influxctl on macOS:

Use Homebrew to install influxctl

  1. Use brew tap to add the influxdata/tap repository to the list of formulae that Homebrew tracks, updates, and installs from:

    brew tap influxdata/tap
    
  2. Install the influxctl package:

    brew install influxctl
    

Manually download and install the influxctl binary

  1. Download the influxctl CLI package appropriate for your CPU type. Download the package from your browser or command line.

    Browser

    influxctl CLI v2.9.8 (x86_64) influxctl CLI v2.9.8 (arm64)

    Command line
    # x86_64
    curl -Oo ~/Downloads/ https://dl.influxdata.com/influxctl/releases/influxctl-v2.9.8-darwin-x86_64.zip
    
    # arm64
    curl -Oo ~/Downloads/ https://dl.influxdata.com/influxctl/releases/influxctl-v2.9.8-darwin-arm64.zip
    
  2. Unpackage the downloaded package.

    Do one of the following:

    • In Finder, double-click the downloaded package file.
    • From the command line, run the following command appropriate for your CPU type:
    # x86_64
    unzip ~/Downloads/influxctl-v2.9.8-darwin-x86_64.zip
    
    # arm64
    unzip ~/Downloads/influxctl-v2.9.8-darwin-arm64.zip
    
  3. (Optional) Place the binary in your $PATH.

    # x86_64
    sudo cp ~/Downloads/influxctl-v2.9.8-darwin-x86_64/influxctl /usr/local/bin/
    
    # arm64
    sudo cp ~/Downloads/influxctl-v2.9.8-darwin-arm64/influxctl /usr/local/bin/
    
  4. Create a connection profile that stores connection credentials for your cluster.

To download the Linux influxctl package, do one of the following:

Use a package manager

# influxdata-archive_compat.key GPG fingerprint:
#     9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
wget -q https://repos.influxdata.com/influxdata-archive_compat.key
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list

sudo apt-get update && sudo apt-get install influxctl
# influxdata-archive_compat.key GPG fingerprint:
#     9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
[influxdata]
name = InfluxData Repository - Stable
baseurl = https://repos.influxdata.com/stable/\$basearch/main
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdata-archive_compat.key
EOF

sudo yum install influxctl

Manually download the package

  1. Download the influxctl CLI package appropriate for your CPU type. Download the package from your browser or command line.

    Browser

    influxctl CLI v2.9.8 (x86_64) influxctl CLI v2.9.8 (arm64)

    Command line
    # amd64
    curl -O https://dl.influxdata.com/influxctl/releases/influxctl-v2.9.8-linux-x86_64.tar.gz
    
    # arm64
    curl -O https://dl.influxdata.com/influxctl/releases/influxctl-v2.9.8-linux-arm64.tar.gz
    
  2. Unpackage the downloaded package.

    # amd64
    tar zxvf influxctl-v2.9.8-linux-x86_64.tar.gz
    
    # arm64
    tar zxvf influxctl-v2.9.8-linux-arm64.tar.gz
    
  3. (Optional) Place the binary in your $PATH.

    # amd64
    sudo cp influxctl-v2.9.8-darwin-x86_64/influxctl /usr/local/bin/
    
    # arm64
    sudo cp influxctl-v2.9.8-darwin-arm64/influxctl /usr/local/bin/
    
  4. Create a connection profile that stores connection credentials for your cluster.

  1. Download the influxctl CLI package.

    influxctl CLI v2.9.8 (x86_64)

  2. Expand the downloaded archive.

    Expand the downloaded archive into C:\Program Files\InfluxData\ and rename it if desired.

    Expand-Archive .\influxctl-v2.9.8-windows-x86_64.zip `
    -DestinationPath 'C:\Program Files\InfluxData\'
    mv 'C:\Program Files\InfluxData\influxctl-v2.9.8-windows-x86_64' `
    'C:\Program Files\InfluxData\influxctl'
    
  3. Grant network access to the influxctl CLI.

    When using the influxctl CLI for the first time, Windows Defender displays the following message:

    Windows Defender Firewall has blocked some features of this app.

    To grant the influxctl CLI the required access, do the following:

    Select Private networks, such as my home or work network. Click Allow access.

  4. Create a connection profile that stores connection credentials for your cluster.


Configure connection profiles

To connect with your InfluxDB Cloud Dedicated cluster, influxctl needs the following credentials:

  • InfluxDB Cloud Dedicated account ID
  • InfluxDB Cloud Dedicated cluster ID

Create a configuration file

Create a config.toml that includes the necessary credentials. If stored at the default location for your operating system, influxctl automatically detects and uses the connection profile configurations. If stored at a non-default location, include the --config flag with each influxctl command and provide the path to your profile configuration file.

View sample config.toml

Default connection profile store location

The influxctl CLI checks for connection profiles in a config.toml file at a default location based on your operating system:

Operating systemDefault profile configuration file path
Linux~/.config/influxctl/config.toml
macOS~/Library/Application Support/influxctl/config.toml
Windows%APPDATA%\influxctl\config.toml

Authentication

The influxctl CLI uses Auth0 to authenticate access to your InfluxDB Cloud Dedicated cluster. When you issue an influxctl command, the CLI checks for an active Auth0 token. If none exists, you are directed to login to Auth0 via a browser using credentials you should have created when setting up your InfluxDB Cloud Dedicated cluster. Auth0 issues a short-lived (1 hour) token that authenticates access to your InfluxDB Cloud Dedicated cluster.

Troubleshoot

  • Not loading module “atk-bridge”: When authenticating, some Linux systems might report the following warning in the terminal (on stderr):

    Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
    

    To silence the warning when running influxctl commands, unset the GTK_MODULES environment variable (or remove gail:atk-bridge from its value)–for example:

    GTK_MODULES= influxctl ...
    

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB v3 enhancements and InfluxDB Clustered is now generally available

New capabilities, including faster query performance and management tooling advance the InfluxDB v3 product line. InfluxDB Clustered is now generally available.

InfluxDB v3 performance and features

The InfluxDB v3 product line has seen significant enhancements in query performance and has made new management tooling available. These enhancements include an operational dashboard to monitor the health of your InfluxDB cluster, single sign-on (SSO) support in InfluxDB Cloud Dedicated, and new management APIs for tokens and databases.

Learn about the new v3 enhancements


InfluxDB Clustered general availability

InfluxDB Clustered is now generally available and gives you the power of InfluxDB v3 in your self-managed stack.

Talk to us about InfluxDB Clustered