influx
command-line interface for InfluxDB time-series database
TLDR
Start interactive shell
$ influx
Connect to host$ influx -host [hostname] -port [8086]
Execute query$ influx -execute "[SELECT * FROM measurement]"
Use specific database$ influx -database [mydb]
Import data$ influx -import -path [data.txt]
Execute query with JSON output$ influx -database [mydb] -execute "[SELECT * FROM measurement]" -format json
Authenticate$ influx -username [user] -password [pass]
SYNOPSIS
influx [options]
DESCRIPTION
influx is the command-line interface for InfluxDB time-series database. It provides an interactive shell for querying and managing data.The v1 CLI uses direct connection flags (-host, -port, -username) and supports InfluxQL. The v2 CLI is a separate tool that uses token-based authentication and configuration profiles, supporting both InfluxQL and Flux query languages. The options documented here apply to the v1 CLI.
PARAMETERS
-host HOST
InfluxDB server hostname.-port PORT
Server port (default 8086).-database DB
Database to use.-execute QUERY
Execute query and exit.-import
Import data from file.-path FILE
File path for import.-username USER
Authentication username.-password PASS
Authentication password.-precision UNIT
Timestamp precision (ns, u, ms, s, m, h).-ssl
Use HTTPS for requests.-format FORMAT
Output format: column, csv, json (default: column).-type TYPE
Query type: influxql or flux.--help
Display help information.
CAVEATS
InfluxDB must be running. Authentication may be required. InfluxQL syntax differs from SQL.
HISTORY
influx is part of InfluxDB, created by InfluxData as an open-source time-series database platform.
SEE ALSO
grafana-cli(1), mysql(1), psql(1)
