influx - InfluxDB command line interface

The influx command line interface (CLI) includes commands to manage many aspects of InfluxDB, including buckets, organizations, users, tasks, etc.

Usage

  1. influx [flags]
  2. influx [command]

Set your credentials

  1. To avoid having to pass your InfluxDB authentication token with each influx command, set up a configuration profile if you haven’t already.
  2. To see if you have a configuration profile, run influx config. If nothing is displayed, you don’t have a configuration profile.
  3. To configure a profile, in a terminal, run the following command:

    1. # Set up a configuration profile
    2. influx config create -n default \
    3. -u http://localhost:8086 \
    4. -o example-org \
    5. -t mySuP3rS3cr3tT0keN \
    6. -a

This configures a new profile named default and makes the profile active so commands run against this instance. For more detail, see influx config.

Commands

CommandDescription
applyApply an InfluxDB template
authAuthorization management commands
backupBack up data
bucketBucket management commands
completionGenerate completion scripts
configConfiguration management commands
dashboardsList dashboards
deleteDelete points from InfluxDB
exportExport resources as a template
helpHelp about any command
orgOrganization management commands
pingCheck the InfluxDB /health endpoint
queryExecute a Flux query
secretManage secrets
setupCreate default username, password, org, bucket, etc.
stacksManage InfluxDB stacks
taskTask management commands
telegrafsTelegraf configuration management commands
templateSummarize and validate an InfluxDB template
transpileManually transpile an InfluxQL query to Flux
userUser management commands
versionPrint the influx CLI version
writeWrite points to InfluxDB

Mapped environment variables

Some influx CLI flags are mapped to environment variables. Mapped flags get the value of the environment variable. To override environment variables, set the flag explicitly in your command.

Flags

FlagDescription
-h—helpHelp for the influx command

cli