influx
Interact with InfluxDB from the command line
TLDR
Connect to an InfluxDB running on localhost with no credentials
Connect with a specific username (will prompt for a password)
Connect to a specific host
Use a specific database
Execute a given command
Return output in a specific format
SYNOPSIS
influx [command] [flags]
PARAMETERS
--help
Display help for available commands and flags.
--version
Show the influx CLI version.
--host string
HTTP address of InfluxDB.
--skip-verify
Skip TLS certificate verification.
--token string
Authentication token.
--config-path string
Path to the configuration file.
auth
Manage authentication settings.
bucket
Manage buckets.
completion
Generate shell completion scripts.
config
Manage client configurations.
delete
Delete data from InfluxDB.
export
Export data to various formats.
help
Show help information.
inspect
Inspect data in InfluxDB.
org
Manage organizations.
query
Execute a query.
repl
Launch the InfluxQL shell.
restore
Restore data from a backup.
setup
Setup InfluxDB.
task
Manage tasks.
telegrafs
Manage telegraf configurations.
user
Manage users.
write
Write data to InfluxDB.
DESCRIPTION
The influx command is a command-line interface (CLI) tool for interacting with InfluxDB, a time-series database. It allows users to perform various operations such as writing data, querying data, managing buckets, organizations, users, tokens, and other administrative tasks.
It's designed to streamline interactions with InfluxDB and is often used for scripting, automation, and ad-hoc data exploration. The CLI can be used to administer InfluxDB instances, create and manage resources within the database, and interact with InfluxDB Cloud or self-managed instances.
The influx command replaces the older influx client (influxdb1.x). Its primary usage involves configuration through profiles, allowing multiple connections to different InfluxDB instances. It includes subcommands that mirror most of the functions available through InfluxDB's API, making it a versatile tool for both developers and administrators.
CONFIGURATION PROFILES
The influx command allows you to define profiles, making it easy to switch between different InfluxDB instances (e.g., development, staging, production). You can set up profiles using the influx config command and then activate them for subsequent operations.
FLUX SCRIPTING
When using the influx query command, you primarily interact with InfluxDB using the Flux query language. Flux is a powerful data scripting and query language designed for time-series data, and it's the recommended way to interact with InfluxDB 2.0 and later.
HISTORY
The influx CLI tool represents a significant shift from the older 1.x versions of InfluxDB. It was developed to simplify interactions with InfluxDB 2.0 and later versions, which introduced a new data model, Flux query language, and a more centralized architecture. The initial influx client (influxdb1.x) was predominantly designed for InfluxQL and lacked many of the features available in the modern CLI. The new CLI aims to provide a more comprehensive set of tools for managing all aspects of an InfluxDB deployment.
SEE ALSO
influxd(1)