Cluster Commands

Warning! This page documents an earlier version of InfluxDB Enterprise, which is no longer actively developed. InfluxDB Enterprise v1.7 is the most recent stable version of InfluxDB Enterprise.

Use command line tools like influxd-ctl and influx to interact with your cluster and your data, respectively.


Usage: influxd-ctl [options] <command> [options] [<args>]

The available commands are:

add-data          Add a data node  
copy-shard        Copy a shard between data nodes  
copy-shard-status Show all active copy shard tasks  
join              Join a meta node  
kill-copy-shard   Abort an in-progress shard copy  
leave             Remove a meta node  
force-leave       Forcefully remove a meta node  
remove-data       Remove a data node  
remove-shard      Remove a shard from a data node  
show              Show cluster members  
show-shards       Shows the shards in a cluster  
update-data       Update a data node  
truncate-shards   Truncate current shards  


-bind string
      Bind HTTP address of a meta node (default "localhost:8091")
      Use TLS
-config string
      Config file path


Usage of influx:

       Display the version and exit.
  -host 'host name'
       Host to connect to.
  -port 'port #'
       Port to connect to.
  -database 'database name'
       Database to connect to the server.
  -password 'password'
       Password to connect to the server. Leaving blank will prompt for password (--password '').
  -username 'username'
       Username to connect to the server.
       Use https for requests.
       Set this when connecting to the cluster using https and not use SSL verification.
  -execute 'command'
       Execute command and quit.
  -format 'json|csv|column'
       Format specifies the format of the server responses: json, csv, or column.
  -precision 'rfc3339|h|m|s|ms|u|ns'
       Precision specifies the format of the timestamp: rfc3339, h, m, s, ms, u or ns.
  -consistency 'any|one|quorum|all'
       Set write consistency level: any, one, quorum, or all
       Turns on pretty print for the json format.
       Import a previous database export from file
       How many points per second the import will allow. By default it is zero and will not throttle importing.
       Path to file to import
       Set to true if the import file is compressed


Use influx in a non-interactive mode to query the database metrics and pretty print json:

$ influx -database 'metrics' -execute 'select * from cpu' -format 'json' -pretty

Connect to a specific database on startup and set database context:

$ influx -database 'metrics' -host 'localhost' -port '8086'