Documentation

Configure InfluxDB Enterprise clusters

This page contains general information about configuring InfluxDB Enterprise clusters. For complete listings and descriptions of the configuration settings, see:

Use configuration files

Display the default configurations

The following commands print out a TOML-formatted configuration with all available options set to their default values.

Meta node configuration

influxd-meta config

Data node configuration

influxd config

Create a configuration file

On POSIX systems, generate a new configuration file by redirecting the output of the command to a file.

New meta node configuration file:

influxd-meta config > /etc/influxdb/influxdb-meta-generated.conf

New data node configuration file:

influxd config > /etc/influxdb/influxdb-generated.conf

Preserve custom settings from older configuration files when generating a new configuration file with the -config option. For example, this overwrites any default configuration settings in the output file (/etc/influxdb/influxdb.conf.new) with the configuration settings from the file (/etc/influxdb/influxdb.conf.old) passed to -config:

influxd config -config /etc/influxdb/influxdb.conf.old > /etc/influxdb/influxdb.conf.new

Launch the process with a configuration file

There are two ways to launch the meta or data processes using your customized configuration file.

  • Point the process to the desired configuration file with the -config option.

    To start the meta node process with /etc/influxdb/influxdb-meta-generate.conf:

      influxd-meta -config /etc/influxdb/influxdb-meta-generate.conf
    

    To start the data node process with /etc/influxdb/influxdb-generated.conf:

      influxd -config /etc/influxdb/influxdb-generated.conf
    
  • Set the environment variable INFLUXDB_CONFIG_PATH to the path of your configuration file and start the process.

    To set the INFLUXDB_CONFIG_PATH environment variable and launch the data process using INFLUXDB_CONFIG_PATH for the configuration file path:

      export INFLUXDB_CONFIG_PATH=/root/influxdb.generated.conf
      echo $INFLUXDB_CONFIG_PATH
      /root/influxdb.generated.conf
      influxd
    

If set, the command line -config path overrides any environment variable path. If you do not supply a configuration file, InfluxDB uses an internal default configuration (equivalent to the output of influxd config and influxd-meta config).

Note for 1.3, the influxd-meta binary, if no configuration is specified, will check the INFLUXDB_META_CONFIG_PATH. If that environment variable is set, the path will be used as the configuration file. If unset, the binary will check the ~/.influxdb and /etc/influxdb folder for an influxdb-meta.conf file. If it finds that file at either of the two locations, the first will be loaded as the configuration file automatically.
This matches a similar behavior that the open source and data node versions of InfluxDB already follow.

Configure InfluxDB using the configuration file (influxdb.conf) and environment variables. The default value for each configuration setting is shown in the documentation. Commented configuration options use the default value.

Configuration settings with a duration value support the following duration units:

  • ns (nanoseconds)
  • us or µs (microseconds)
  • ms (milliseconds)
  • s (seconds)
  • m (minutes)
  • h (hours)
  • d (days)
  • w (weeks)

Environment variables

All configuration options can be specified in the configuration file or in environment variables. Environment variables override the equivalent options in the configuration file. If a configuration option is not specified in either the configuration file or in an environment variable, InfluxDB uses its internal default configuration.

In the sections below we name the relevant environment variable in the description for the configuration setting. Environment variables can be set in /etc/default/influxdb-meta and /etc/default/influxdb.

Note: To set or override settings in a config section that allows multiple configurations (any section with double_brackets ([[...]]) in the header supports multiple configurations), the desired configuration must be specified by ordinal number. For example, for the first set of [[graphite]] environment variables, prefix the configuration setting name in the environment variable with the relevant position number (in this case: 0):

INFLUXDB_GRAPHITE_0_BATCH_PENDING
INFLUXDB_GRAPHITE_0_BATCH_SIZE
INFLUXDB_GRAPHITE_0_BATCH_TIMEOUT
INFLUXDB_GRAPHITE_0_BIND_ADDRESS
INFLUXDB_GRAPHITE_0_CONSISTENCY_LEVEL
INFLUXDB_GRAPHITE_0_DATABASE
INFLUXDB_GRAPHITE_0_ENABLED
INFLUXDB_GRAPHITE_0_PROTOCOL
INFLUXDB_GRAPHITE_0_RETENTION_POLICY
INFLUXDB_GRAPHITE_0_SEPARATOR
INFLUXDB_GRAPHITE_0_TAGS
INFLUXDB_GRAPHITE_0_TEMPLATES
INFLUXDB_GRAPHITE_0_UDP_READ_BUFFER

For the Nth Graphite configuration in the configuration file, the relevant environment variables would be of the form INFLUXDB_GRAPHITE_(N-1)_BATCH_PENDING. For each section of the configuration file the numbering restarts at zero.

GOMAXPROCS environment variable

Note: GOMAXPROCS cannot be set using the InfluxDB configuration file. It can only be set as an environment variable.

The GOMAXPROCS Go language environment variable can be used to set the maximum number of CPUs that can execute simultaneously.

The default value of GOMAXPROCS is the number of CPUs that are visible to the program on startup (based on what the operating system considers to be a CPU). For a 32-core machine, the GOMAXPROCS value would be 32. You can override this value to be less than the maximum value, which can be useful in cases where you are running the InfluxDB along with other processes on the same machine and want to ensure that the database doesn’t negatively affect those processes.

Note: Setting GOMAXPROCS=1 eliminates all parallelization.


Set your InfluxDB URL

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.