From f44f433c90cac57f09749ce8b07bb749c341588d Mon Sep 17 00:00:00 2001 From: Todd Persen Date: Mon, 8 Jun 2015 14:44:52 -0700 Subject: [PATCH 1/3] Create a valid default config for v0.9.0 --- etc/config.sample.toml | 185 ++++++++++++++++------------------------- 1 file changed, 70 insertions(+), 115 deletions(-) diff --git a/etc/config.sample.toml b/etc/config.sample.toml index 1bcfa2d995..411469ff56 100644 --- a/etc/config.sample.toml +++ b/etc/config.sample.toml @@ -1,125 +1,80 @@ # Welcome to the InfluxDB configuration file. -# If hostname (on the OS) doesn't return a name that can be resolved by -# the other systems in the cluster, you'll have to set the hostname to an -# IP or something that can be resolved here. -# hostname = "" +[meta] + dir = "/var/opt/influxdb/meta" + hostname = "localhost" + bind-address = ":8088" + retention-autocreate = true + election-timeout = "1s" + heartbeat-timeout = "1s" + leader-lease-timeout = "500ms" + commit-timeout = "50ms" -bind-address = "0.0.0.0" +[data] + dir = "/var/opt/influxdb/data" + retention-auto-create = true + retention-check-enabled = true + retention-check-period = "10m0s" + retention-create-period = "45m0s" -# The default cluster and API port -port = 8086 +[cluster] + shard-writer-timeout = "5s" + +[retention] + enabled = true + check-interval = "10m0s" + +[admin] + enabled = true + bind-address = ":8083" + +[http] + enabled = true + bind-address = ":8086" + auth-enabled = false + log-enabled = true + write-tracing = false + pprof-enabled = false + +[collectd] + enabled = false + bind-address = "" + database = "" + typesdb = "" + +[opentsdb] + enabled = false + bind-address = "" + database = "" + retention-policy = "" + +[udp] + enabled = false + bind-address = "" + database = "" + batch-size = 0 + batch-timeout = "0" # Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com -# The data includes raft id (random 8 bytes), os, arch and version +# The data includes randomly-generated ids, os, arch and version. # We don't track ip addresses of servers reporting. This is only used # to track the number of instances running and the versions, which # is very helpful for us. -# Change this option to true to disable reporting. -reporting-disabled = false - -# Controls settings for initial start-up. Once a node is successfully started, -# these settings are ignored. If a node is started with the -join flag, -# these settings are ignored. -[initialization] -join-urls = "" # Comma-delimited URLs, in the form http://host:port, for joining another cluster. - -# Control authentication -# If not set authetication is DISABLED. Be sure to explicitly set this flag to -# true if you want authentication. -[authentication] -enabled = false - -# Configure the admin server -[admin] -enabled = true -port = 8083 - -# Configure the HTTP API endpoint. All time-series data and queries uses this endpoint. -[api] -# ssl-port = 8087 # SSL support is enabled if you set a port and cert -# ssl-cert = "/path/to/cert.pem" - -# Configure the Graphite plugins. -[[graphite]] # 1 or more of these sections may be present. -enabled = false -# protocol = "" # Set to "tcp" or "udp" -# bind-address = "0.0.0.0" # If not set, is actually set to bind-address. -# port = 2003 -# name-position = "last" -# name-separator = "-" -# database = "" # store graphite data in this database -# batch-size = 0 # How many points to batch up internally before writing. -# batch-timeout = "0ms" # Maximum time to wait before sending batch, regardless of current size. - -# Configure the collectd input. -[collectd] -enabled = false -# bind-address = "0.0.0.0" # If not set, is actually set to bind-address. -# port = 25827 -# database = "collectd_database" -# typesdb = "types.db" -# batch-size = 0 # How many points to batch up internally before writing. -# batch-timeout = "0ms" # Maximum time to wait before sending batch, regardless of current size. - -# Configure the OpenTSDB input. -[opentsdb] -enabled = false -# address = "0.0.0.0" # If not set, is actually set to bind-address. -# port = 4242 -# database = "opentsdb_database" - -# Configure UDP listener for series data. -[udp] -enabled = false -# bind-address = ":4444" -# database = "udp_database" -# batch-size = 0 # How many points to batch up internally before writing. -# batch-timeout = "0ms" # Maximum time to wait before sending batch, regardless of current size. - -# Broker configuration. Brokers are nodes which participate in distributed -# consensus. -[broker] -enabled = true -# Where the Raft logs are stored. The user running InfluxDB will need read/write access. -dir = "/var/opt/influxdb/raft" -truncation-interval = "10m" -max-topic-size = 52428800 -max-segment-size = 10485760 - -# Raft configuration. Controls the distributed consensus system. -[raft] -apply-interval = "10ms" -election-timeout = "5s" -heartbeat-interval = "100ms" -reconnect-timeout = "10ms" - -# Data node configuration. Data nodes are where the time-series data, in the form of -# shards, is stored. -[data] -enabled = true -dir = "/var/opt/influxdb/db" - -# Auto-create a retention policy when a database is created. Defaults to true. -retention-auto-create = true - -# Control whether retention policies are enforced and how long the system waits between -# enforcing those policies. -retention-check-enabled = true -retention-check-period = "10m" - -# Configuration for snapshot endpoint. -[snapshot] -enabled = true # Enabled by default if not set. - -[logging] -write-tracing = false # If true, enables detailed logging of the write system. -raft-tracing = false # If true, enables detailed logging of Raft consensus. -http-access = true # If true, logs each HTTP access to the system. - -# InfluxDB can store statistical and diagnostic information about itself. This is useful for -# monitoring purposes. This feature is disabled by default, but if enabled, these data can be -# queried like any other data. [monitoring] -enabled = false -write-interval = "1m" # Period between writing the data. + enabled = false + write-interval = "1m0s" + +[continuous_queries] + enabled = true + recompute-previous-n = 2 + recompute-no-older-than = "10m0s" + compute-runs-per-interval = 10 + compute-no-more-than = "2m0s" + +[hinted-handoff] + enabled = true + dir = "/var/opt/influxdb/hh" + max-size = 1073741824 + max-age = "168h0m0s" + retry-rate-limit = 0 + retry-interval = "1s" From f9188687dea3d5a4afcde7d518132b60f9cdb9af Mon Sep 17 00:00:00 2001 From: Todd Persen Date: Tue, 9 Jun 2015 03:38:07 -0700 Subject: [PATCH 2/3] Clean up intervals and add graphite section. --- etc/config.sample.toml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/etc/config.sample.toml b/etc/config.sample.toml index 411469ff56..5ae12f64ed 100644 --- a/etc/config.sample.toml +++ b/etc/config.sample.toml @@ -12,7 +12,6 @@ [data] dir = "/var/opt/influxdb/data" - retention-auto-create = true retention-check-enabled = true retention-check-period = "10m0s" retention-create-period = "45m0s" @@ -36,40 +35,40 @@ write-tracing = false pprof-enabled = false +[[graphite]] + enabled = false + # protocol = "" + # bind-address = "" + [collectd] enabled = false - bind-address = "" - database = "" - typesdb = "" + # bind-address = "" + # database = "" + # typesdb = "" [opentsdb] enabled = false - bind-address = "" - database = "" - retention-policy = "" + # bind-address = "" + # database = "" + # retention-policy = "" [udp] enabled = false - bind-address = "" - database = "" - batch-size = 0 - batch-timeout = "0" + # bind-address = "" + # database = "" + # batch-size = 0 + # batch-timeout = "0" -# Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com -# The data includes randomly-generated ids, os, arch and version. -# We don't track ip addresses of servers reporting. This is only used -# to track the number of instances running and the versions, which -# is very helpful for us. [monitoring] enabled = false - write-interval = "1m0s" + write-interval = "24h" [continuous_queries] enabled = true recompute-previous-n = 2 - recompute-no-older-than = "10m0s" + recompute-no-older-than = "10m" compute-runs-per-interval = 10 - compute-no-more-than = "2m0s" + compute-no-more-than = "2m" [hinted-handoff] enabled = true From f4c07d9d92d652009b65439e40de681d25bd3058 Mon Sep 17 00:00:00 2001 From: Todd Persen Date: Tue, 9 Jun 2015 10:27:27 -0700 Subject: [PATCH 3/3] Add some section-level comments to the config. --- etc/config.sample.toml | 96 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 89 insertions(+), 7 deletions(-) diff --git a/etc/config.sample.toml b/etc/config.sample.toml index 5ae12f64ed..7d932012c8 100644 --- a/etc/config.sample.toml +++ b/etc/config.sample.toml @@ -1,4 +1,11 @@ -# Welcome to the InfluxDB configuration file. +### Welcome to the InfluxDB configuration file. + +### +### [meta] +### +### Controls the parameters for the Raft consensus group that stores metadata +### about the InfluxDB cluster. +### [meta] dir = "/var/opt/influxdb/meta" @@ -10,23 +17,52 @@ leader-lease-timeout = "500ms" commit-timeout = "50ms" +### +### [data] +### +### Controls where the actual shard data for InfluxDB lives. +### + [data] dir = "/var/opt/influxdb/data" - retention-check-enabled = true - retention-check-period = "10m0s" - retention-create-period = "45m0s" + +### +### [cluster] +### +### Controls non-Raft cluster behavior, which generally includes how data is +### shared across shards. +### [cluster] shard-writer-timeout = "5s" +### +### [retention] +### +### Controls the enforcement of retention policies for evicting old data. +### + [retention] enabled = true - check-interval = "10m0s" + check-interval = "10m" + +### +### [admin] +### +### Controls the availability of the built-in, web-based admin interface. +### [admin] enabled = true bind-address = ":8083" +### +### [http] +### +### Controls how the HTTP endpoints are configured. These are the primary +### mechanism for getting data into and out of InfluxDB. +### + [http] enabled = true bind-address = ":8086" @@ -35,23 +71,47 @@ write-tracing = false pprof-enabled = false +### +### [[graphite]] +### +### Controls one or many listeners for Graphite data. +### + [[graphite]] enabled = false # protocol = "" # bind-address = "" +### +### [collectd] +### +### Controls the listener for collectd data. +### + [collectd] enabled = false # bind-address = "" # database = "" # typesdb = "" +### +### [opentsdb] +### +### Controls the listener for OpenTSDB data. +### + [opentsdb] enabled = false # bind-address = "" # database = "" # retention-policy = "" +### +### [udp] +### +### Controls the listener for InfluxDB line protocol data via UDP. +### + [udp] enabled = false # bind-address = "" @@ -59,10 +119,24 @@ # batch-size = 0 # batch-timeout = "0" +### +### [monitoring] +### +### Controls the anonymous statistics reporting function of InfluxDB. At start +### and once per interval, the daemon will send some basic internal statistics +### to help us see how InfluxDB is being used in the wild. +### + [monitoring] - enabled = false + enabled = true write-interval = "24h" +### +### [continuous_queries] +### +### Controls how continuous queries are run within InfluxDB. +### + [continuous_queries] enabled = true recompute-previous-n = 2 @@ -70,10 +144,18 @@ compute-runs-per-interval = 10 compute-no-more-than = "2m" +### +### [hinted-handoff] +### +### Controls the hinted handoff feature, which allows nodes to temporarily +### store queued data when one node of a cluster is down for a short period +### of time. +### + [hinted-handoff] enabled = true dir = "/var/opt/influxdb/hh" max-size = 1073741824 - max-age = "168h0m0s" + max-age = "168h" retry-rate-limit = 0 retry-interval = "1s"