influxdb.conf
/etc/influxdb/influxdb.conf
> cat /etc/influxdb/influxdb.conf
### run influxd config|more after changing this file to check for errors!
### sudo systemctl stop ruuvicollector; sudo systemctl stop influxdb; sudo systemctl start influxdb;
sudo systemctl start ruuvicollector
# trace-logging-enabled = false
# query-log-enabled = false
# DGG timeouts, level='erro'; /var/lib NO move to /mnt/data/influxdb
# 5/05/19 sudo mv influxdb /varnew/lib
# 12/01/18 query-timeout 18s exceeded with:
# select mac,time, temperature, absoluteHumidity,batteryVoltage from ruuvi_measurements
# where batteryVoltage>0 and batteryVoltage < 1.8 limit 4
# ALL datafiles must be influxdb influxdb
# When aptitude upgrades , compare using:
# sudo sed "/^ \{0,3\}#/d; /^$/d" /etc/influxdb/influxdb.conf >0dist
# sudo sed "/^ \{0,3\}#/d; /^$/d" /etc/influxdb/influxdb.conf.dpkg-old >0dgg
# diff 0dgg 0dist
# values here override defaults
# Commented out lines are the configuration field and the default value used.
# Uncommenting a line and changing the value # will change the value used at runtime when the process is restarted.
# Bind address to use for the RPC service for backup and restore.
# bind-address = "127.0.0.1:8088"
[meta]
### Controls the parameters for the Raft consensus group that stores metadata about the InfluxDB cluster.
# Where the metadata/raft database is stored
dir = "/varnew/lib/influxdb/meta"
##dir = "/var/lib/influxdb/meta"
##dir = "/mnt/data/influxdb/meta"
# Automatically create a default retention policy when creating a database.
# retention-autocreate = true
# If log messages are output for the meta service
# logging-enabled = true
[data]
### Controls where the actual shard data for InfluxDB lives and how it is flushed from the WAL.
### WAL settings are an advanced configuration.
# directory where the TSM storage engine stores TSM files.
dir = "/varnew/lib/influxdb/data"
## dir = "/var/lib/influxdb/data"
## dir = "/mnt/data/influxdb/data"
# directory where the TSM storage engine stores WAL files.
wal-dir = "/varnew/lib/influxdb/wal"
## wal-dir = "/var/lib/influxdb/wal"
##wal-dir = "/mnt/data/influxdb/wal"
# time a write will wait before fsyncing.
# batchs up multiple fsync calls. useful for slower disks or when WAL write contention is seen. 0s fsyncs every write BAD
# 0-100ms are recommended for non-SSD disks.
wal-fsync-delay = "5s"
# type of shard index to use for new shards. default in-memory index recreated at startup. inmem
#"tsi1" will use a disk based index that supports higher cardinality datasets.
# index-version = "inmem"
# Trace logging provides more verbose output around the tsm engine.
trace-logging-enabled = false
# should queries be logged before execution. Logs includes sensitive data contained within a query.
query-log-enabled = false
# Validates incoming writes to ensure keys only have valid unicode characters.
# validate-keys = false
# Settings for the TSM engine
# Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k) without suffix:bytes.
# CacheMaxMemorySize is the maximum size a shard's cache can reach before it starts rejecting writes. deafult 1g (too bit for pi
cache-max-memory-size = "300m"
# CacheSnapshotMemorySize is the size at which the engine will snapshot the cache and write it to a TSM file, freeing up memory
# cache-snapshot-memory-size = "25m"
# CacheSnapshotWriteColdDuration time when snapshot cache and write to a new TSM file if the shard hasn't received writes or deletes
# cache-snapshot-write-cold-duration = "10m"
# CompactFullWriteColdDuration duration at which compact all TSM files in a shard if it hasn't received a write or delete
# compact-full-write-cold-duration = "4h"
# maximum concurrent full and level compactions that can run at one time.
# 0 results in 50% of runtime.GOMAXPROCS(0) used at runtime, greater 0 limits compactions to that value.
# does not apply to cache snapshotting.
# max-concurrent-compactions = 0
# CompactThroughput rate limit in bytes per second compactions to write to disk,
# short bursts are allowed at a possibly larger value, set by CompactThroughputBurst
# compact-throughput = "48m"
# CompactThroughputBurst rate limit in bytes/sec that will allow TSM compactions to write to disk.
# compact-throughput-burst = "48m"
# Threshold, in bytes, when an index write-ahead log file will compact into an index file.
# Lower sizes will cause log files to be compacted more
# quickly and result in lower heap usage at the expense of write throughput.
# Higher sizes will be compacted less frequently, store more series in-memory, and provide higher write throughput.
# Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
# Values without a size suffix are in bytes.
# max-index-log-file-size = "1m"
# maximum series allowed per database before writes are dropped.
# prevents high cardinality issues at the database level. 0 disables
# max-series-per-database = 1000000
# maximum number of tag values per tag that are allowed before writes are dropped.
# prevents high cardinality tag values from being written to a measurement. 0 disables
# max-values-per-tag = 100000
# true: mmap advise value MADV_WILLNEED will be provided to the kernel with respect to TSM files.
# problematic on some kernels, and defaults to off. May be helpful with slow disks
# tsm-use-madv-willneed = false
## following added
series-id-set-cache-size = 100
### Controls the clustering service configuration.
[coordinator]
# The default time a write request will wait until a "timeout" error is returned to the caller.: 10s
# write-timeout = "10s"
# maximum number of concurrent queries allowed to be executing at one time.
# a query executed and exceeds this limit, an error is returned to the caller. 0 disables
# max-concurrent-queries = 0
# The maximum time a query will is allowed to execute before being killed by the system.
# prevent run away queries. 0 disables (8 sec is not enough!) 60s doesn;t make it for 3 months
query-timeout = "90s"
# time threshold when a query will be logged as a slow query, discover slow or resource intensive queries. 0 disables
log-queries-after = "10s"
# maximum points a SELECT can process. 0: unlimited.
# checked every second so queries will not be aborted immediately when hitting the limit.
# max-select-point = 0
# maximum number of series a SELECT can run. 0: unlimited.
# max-select-series = 0
# maxium number of group by time bucket a SELECT can create. 0: unlimited.
# max-select-buckets = 0
### Controls the enforcement of retention policies for evicting old data.
[retention]
# policy enforcement enabled.
# enabled = true
# interval retention policy enforcement checks run.
# check-interval = "30m"
[shard-precreation]
### Controls the precreation of shards, so they are available before data arrives.
### Only shards that, after creation, will have both a start- and end-time in the future, will ever be created.
### Shards are never precreated that would be wholly or partially in the past.
# shard pre-creation
# enabled = true
# when the check to pre-create new shards runs.
# check-interval = "10m"
# default period ahead of the endtime of a shard group that its successor group is created.
# advance-period = "30m"
[monitor]
### Controls the system self-monitoring, statistics and diagnostics.
### The internal database for monitoring data is created automatically if if it does not already exist.
### The target retention within this database is called 'monitor' and
### is also created with a retention period of 7 days and a replication factor of 1, if it does not exist.
### this retention policy is configured as the default for the database.
# record statistics internally.
# store-enabled = true
# destination database for recorded statistics
# store-database = "_internal"
# interval at which to record statistics
# store-interval = "10s"
[http]
### Controls how the HTTP endpoints are configured. These are the primary mechanism for getting data into and out of InfluxDB.
# Determines whether HTTP endpoint is enabled.
# enabled = true
# Determines whether the Flux query endpoint is enabled.
# flux-enabled = false
# The bind address used by the HTTP service.
# bind-address = ":8086"
# Determines whether user authentication is enabled over HTTP/HTTPS.
# auth-enabled = false
# The default realm sent back when issuing a basic auth challenge.
# realm = "InfluxDB"
# Determines whether HTTP request logging is enabled.
# log-enabled = true
# Determines whether the HTTP write request logs should be suppressed when the log is enabled.
# suppress-write-log = false
# When HTTP request logging is enabled, this option specifies the path where
# log entries should be written. If unspecified, the default is to write to stderr, which
# intermingles HTTP logs with internal InfluxDB logging.
#
# If influxd is unable to access the specified path, it will log an error and fall back to writing
# the request log to stderr.
# access-log-path = ""
# Filters which requests should be logged. Each filter is of the pattern NNN, NNX, or NXX where N is
# a number and X is a wildcard for any number. To filter all 5xx responses, use the string 5xx.
# If multiple filters are used, then only one has to match. The default is to have no filters which
# will cause every request to be printed.
# access-log-status-filters = []
# Determines whether detailed write logging is enabled.
# write-tracing = false
# Determines whether the pprof endpoint is enabled ( used for troubleshooting and monitoring.)
# pprof-enabled = true
# Enables a pprof endpoint that binds to localhost:6060 immediately on startup. needed to debug startup issues.
# debug-pprof-enabled = false
# https-enabled = false
# https-certificate = "/etc/ssl/influxdb.pem"
# Use a separate private key location.
# https-private-key = ""
# The JWT auth shared secret to validate requests using JSON web tokens.
# shared-secret = ""
# default chunk size for result sets that should be chunked.
# max-row-limit = 0
# maximum HTTP connections open at once. New connections that would exceed this limit are dropped. 0 disables
# max-connection-limit = 0
# Enable http service over unix domain socket
# unix-socket-enabled = false
# path of the unix domain socket.
# bind-socket = "/var/run/influxdb.sock"
# maximum size of a client request body, in bytes. 0 disables
# max-body-size = 25000000
# maximum number of writes processed concurrently. 0 disables
# max-concurrent-write-limit = 0
# maximum number of writes queued for processing. 0 disables
# max-enqueued-write-limit = 0
# maximum duration for a write to wait in the queue to be processed.i 0 disables
# enqueued-write-timeout = 0
[logging]
### Controls how the logger emits logs to the output.
# which log encoder to use: auto, logfmt or json.
# auto a more user-friendly format if the output terminal is a TTY, but not as easily machine-readable.
# When the output is a non-TTY, auto uses logfmt.
# format = "auto"
# level of logs will be emitted: error, warn, info, or debug. Logs that are equal to or above the specified level will be emitted.
# warn includes
level = "warn"
# logo output printed when started. always suppressed if STDOUT is not a TTY.
# suppress-logo = false
[subscriber]
### Controls the subscriptions, which can be used to fork a copy of all data received by the InfluxDB host.
# whether subscriber service is enabled.
# enabled = true
# timeout for HTTP writes to subscribers. 30s
# http-timeout = "30s"
# Allows insecure HTTPS connections to subscribers. useful when testing with self-signed certificates.
# insecure-skip-verify = false
# path to the PEM encoded CA certs file. If null , default system certs will be used
# ca-certs = ""
# number of writer goroutines processing the write channel.
# write-concurrency = 40
# number of in-flight writes buffered in the write channel.
# write-buffer-size = 1000
[[graphite]]
### Controls one or many listeners for Graphite data.
# Determines whether the graphite endpoint is enabled.
# enabled = false
# database = "graphite"
# retention-policy = ""
# bind-address = ":2003"
# protocol = "tcp"
# consistency-level = "one"
# control batching
# otherwise you could get dropped metrics or poor performance. Batching
# will buffer points in memory if you have many coming in.
# Flush if this many points get buffered
# batch-size = 5000
# number of batches that may be pending in memory
# batch-pending = 10
# Flush at least this often even if we haven't hit buffer limit
# batch-timeout = "1s"
# UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
# udp-read-buffer = 0
### This string joins multiple matching 'measurement' values providing more control over the final measurement name.
# separator = "."
### Default tags that will be added to all metrics. These can be overridden at the template level
### or by tags extracted from metric
# tags = ["region=us-east", "zone=1c"]
### Each template line requires a template pattern. It can have an optional
### filter before the template and separated by spaces. It can also have optional extra
### tags following the template. Multiple tags should be separated by commas and no spaces
### similar to the line protocol format. There can be only one default template.
# templates = [
# "*.app env.service.resource.measurement",
# # Default template
# "server.*",
# ]
###
### [collectd]
###
### Controls one or many listeners for collectd data.
###
[[collectd]]
# enabled = false
# bind-address = ":25826"
# database = "collectd"
# retention-policy = ""
#
# The collectd service supports either scanning a directory for multiple types
# db files, or specifying a single db file.
# typesdb = "/usr/local/share/collectd"
#
# security-level = "none"
# auth-file = "/etc/collectd/auth_file"
# These next lines control how batching works. You should have this enabled
# otherwise you could get dropped metrics or poor performance. Batching
# will buffer points in memory if you have many coming in.
# Flush if this many points get buffered
# batch-size = 5000
# Number of batches that may be pending in memory
# batch-pending = 10
# Flush at least this often even if we haven't hit buffer limit
# batch-timeout = "10s"
# UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
# read-buffer = 0
# Multi-value plugins can be handled two ways.
# "split" will parse and store the multi-value plugin data into separate measurements
# "join" will parse and store the multi-value plugin as a single multi-value measurement.
# "split" is the default behavior for backward compatability with previous versions of influxdb.
# parse-multivalue-plugin = "split"
###
### [opentsdb]
###
### Controls one or many listeners for OpenTSDB data.
###
[[opentsdb]]
# enabled = false
# bind-address = ":4242"
# database = "opentsdb"
# retention-policy = ""
# consistency-level = "one"
# tls-enabled = false
# certificate= "/etc/ssl/influxdb.pem"
# Log an error for every malformed point.
# log-point-errors = true
# These next lines control how batching works. You should have this enabled
# otherwise you could get dropped metrics or poor performance. Only points
# metrics received over the telnet protocol undergo batching.
# Flush if this many points get buffered
# batch-size = 1000
# Number of batches that may be pending in memory
# batch-pending = 5
# Flush at least this often even if we haven't hit buffer limit
# batch-timeout = "1s"
###
### [[udp]]
###
### Controls the listeners for InfluxDB line protocol data via UDP.
###
[[udp]]
# enabled = false
# bind-address = ":8089"
# database = "udp"
# retention-policy = ""
# InfluxDB precision for timestamps on received points ("" or "n", "u", "ms", "s", "m", "h")
# precision = ""
# These next lines control how batching works. You should have this enabled
# otherwise you could get dropped metrics or poor performance. Batching
# will buffer points in memory if you have many coming in.
# Flush if this many points get buffered
# batch-size = 5000
# Number of batches that may be pending in memory
# batch-pending = 10
# Will flush at least this often even if we haven't hit buffer limit
# batch-timeout = "1s"
# UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
# read-buffer = 0
###
### [continuous_queries]
###
### Controls how continuous queries are run within InfluxDB.
###
[continuous_queries]
# Determines whether the continuous query service is enabled.
# enabled = true
# Controls whether queries are logged when executed by the CQ service.
# log-enabled = true
# Controls whether queries are logged to the self-monitoring data store.
# query-stats-enabled = false
# interval for how often continuous queries will be checked if they need to run
# run-interval = "1s"
###
### [tls]
###
### Global configuration settings for TLS in InfluxDB.
###
[tls]
# Determines the available set of cipher suites. See https://golang.org/pkg/crypto/tls/#pkg-constants
# for a list of available ciphers, which depends on the version of Go (use the query
# SHOW DIAGNOSTICS to see the version of Go used to build InfluxDB). If not specified, uses
# the default settings from Go's crypto/tls package.
# ciphers = [
# "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
# "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
# ]
# Minimum version of the tls protocol that will be negotiated. If not specified, uses the
# default settings from Go's crypto/tls package.
# min-version = "tls1.2"
# Maximum version of the tls protocol that will be negotiated. If not specified, uses the
# default settings from Go's crypto/tls package.
# max-version = "tls1.2"
# every 24 hours InfluxDB reports to usage.influxdata.com
# No data from user databases is ever transmitted. true disabls
# reporting-disabled = false