From 799e89355288e7dc12c6236aad673f8f7b3cfc06 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 9 Oct 2018 21:02:00 -0600 Subject: [PATCH 1/8] sync with primogen v24. --- .gitignore | 2 +- .travis.yml | 31 ++++++++++++++++++++++---- README.md | 1 - tests/ansible.cfg | 3 +-- tests/{dependencies => roles}/.gitkeep | 0 tests/setup.sh | 2 +- tests/vagrant.sh | 8 ++++--- tox.ini | 15 +++++++++---- 8 files changed, 46 insertions(+), 16 deletions(-) rename tests/{dependencies => roles}/.gitkeep (100%) diff --git a/.gitignore b/.gitignore index 16e5fb1..4754989 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ *.retry -**/dependencies/* +**/roles/* # Created by https://www.gitignore.io diff --git a/.travis.yml b/.travis.yml index c6d0f94..60f7a69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,18 @@ sudo: yes matrix: include: + - python: 3.6 + env: TOXENV=py36-ansible27 + - python: 3.6 + env: TOXENV=py36-ansible26 + - python: 3.6 + env: TOXENV=py36-ansible25 + - python: 2.7 + env: TOXENV=py27-ansible24 + - python: 2.7 + env: TOXENV=py27-ansible23 + - python: 2.7 + env: TOXENV=py27-ansible22 - python: 2.7 env: TOXENV=py27-ansible21 - python: 2.7 @@ -17,12 +29,23 @@ script: - tox notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ + email: false + slack: + template: + - "%{repository_name}@%{branch} %{commit} : [%{build_number}] %{result} " + - "%{build_url}" + - "'%{commit_subject}' by %{author}" + - "%{elapsed_time} : %{duration}" + - "%{message}" + rooms: + secure:xxx + on_success: always + on_failure: always + webhooks: https://galaxy.ansible.com/api/v1/notifications/ before_cache: - - rm -f ${HOME}/.cache/pip/log/debug.log + - "find ${HOME}/.pip -name log -o -name __pycache__ -type d | xargs -I {} rm -rf {}" cache: directories: - - ${HOME}/.cache/pip - + - "${HOME}/.cache/pip" diff --git a/README.md b/README.md index 937d2b8..3db7ebe 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ [Ansible][ansible] role to setup [InfluxDB][influxdb]. - ## Tests | Family | Distribution | Version | Test Status | diff --git a/tests/ansible.cfg b/tests/ansible.cfg index 992355f..e487797 100644 --- a/tests/ansible.cfg +++ b/tests/ansible.cfg @@ -6,5 +6,4 @@ host_key_checking = False private_key_file = ~/.vagrant.d/insecure_private_key -roles_path = ../../:../:dependencies - +roles_path = ../../:../ diff --git a/tests/dependencies/.gitkeep b/tests/roles/.gitkeep similarity index 100% rename from tests/dependencies/.gitkeep rename to tests/roles/.gitkeep diff --git a/tests/setup.sh b/tests/setup.sh index 47fa6eb..044fb87 100644 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -29,5 +29,5 @@ test -s ${DIR}/../requirements.yml \ && ansible-galaxy install \ --force \ -r ${DIR}/../requirements.yml \ - --roles-path=${DIR}/dependencies \ + --roles-path=${DIR}/roles \ || true diff --git a/tests/vagrant.sh b/tests/vagrant.sh index 9e4bed3..542b581 100644 --- a/tests/vagrant.sh +++ b/tests/vagrant.sh @@ -3,7 +3,7 @@ # # Bash script to run the test suite against the Vagrant environment. # -# version: 1.2 +# version: 1.8 # # usage: # @@ -16,6 +16,9 @@ # # changelog: # +# v1.8 : 10 August 2016 +# - force provisioning +# # v1.6 : 10 Jun 2016 # - exit if USER environment variable is travis # @@ -61,7 +64,7 @@ do if [ ! -n "${BOX+1}" ] || [ "${BOX}" = "${VAGRANT_BOX}" ]; then echo "[INFO] preparing ${VAGRANT_BOX}..." - vagrant up ${VAGRANT_BOX} 2> /dev/null + vagrant up --provision ${VAGRANT_BOX} 2> /dev/null if [ $? -ne 0 ]; then # box not enabled continue @@ -74,4 +77,3 @@ do vagrant destroy -f ${VAGRANT_BOX} fi done - diff --git a/tox.ini b/tox.ini index b8c58df..106b63d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - {py27}-{ansible21,ansible20,ansible19} + py{36,27}-ansible{27,26,25,24,23,22,21,20,19} skipsdist = True @@ -9,9 +9,16 @@ skipsdist = True changedir = tests deps = - ansible21: ansible==2.1.* - ansible20: ansible==2.0.* - ansible19: ansible==1.9.* + ansible27: ansible>=2.7,<2.8 + ansible26: ansible>=2.6,<2.7 + ansible25: ansible>=2.5,<2.6 + ansible24: ansible>=2.4,<2.5 + ansible23: ansible>=2.3,<2.4 + ansible22: ansible>=2.2,<2.3 + ansible21: ansible>=2.1,<2.2 + ansible20: ansible>=2.0.0,<2.1 + ansible19: ansible>=1.9,<2.0.0 + passenv = ANSIBLE_ASK_SUDO_PASS HOME LANG LC_ALL TRAVIS USER From c9f691cbb4b6d8de849fb290dbc1b26fdcec9a8a Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 9 Oct 2018 21:15:39 -0600 Subject: [PATCH 2/8] LICENSE: updated. --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 8180360..f66c7b6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016, ansiblebit +Copyright (c) 2016-2018, ansiblebit All rights reserved. Redistribution and use in source and binary forms, with or without From d3aead906fa50fd5c62bd57a3a78c2a0e5aa4297 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 9 Oct 2018 21:26:50 -0600 Subject: [PATCH 3/8] tasks: fixed deprecation notices. --- tasks/debug.yml | 2 +- tasks/main.yml | 3 +-- tasks/validation.yml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tasks/debug.yml b/tasks/debug.yml index f860c32..5702124 100644 --- a/tasks/debug.yml +++ b/tasks/debug.yml @@ -6,7 +6,7 @@ - debug: var="{{ item }}" - when: "{{ item }} is defined" + when: item is defined with_items: - ansible_distribution - ansible_distribution_release diff --git a/tasks/main.yml b/tasks/main.yml index aae00ca..14f84ec 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,11 +20,10 @@ - name: ensure apt dependencies are installed apt: - name="{{ item }}" + name="{{ influxdb_apt_dependencies }}" state=present become: yes when: ansible_distribution | lower == 'debian' and influxdb_apt_dependencies is defined - with_items: "{{ influxdb_apt_dependencies }}" - name: ensure influxdb apt key is present apt_key: diff --git a/tasks/validation.yml b/tasks/validation.yml index 6e40819..167eae0 100644 --- a/tasks/validation.yml +++ b/tasks/validation.yml @@ -7,7 +7,7 @@ - name: ensure mandatory variables are set fail: msg="{{ item }} is a mandatory variable" - when: "{{ item }} is not defined" + when: item is not defined with_items: - influxdb_admin_port - influxdb_conf_file From c2ff1795d8cbee2ffb9c2ed3d50b2af4849e8276 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 9 Oct 2018 22:08:57 -0600 Subject: [PATCH 4/8] README.md: fixed marklint warnings. --- README.md | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 3db7ebe..490df14 100644 --- a/README.md +++ b/README.md @@ -21,38 +21,35 @@ | Debian | Ubuntu | Precise | [![x86_64](http://img.shields.io/badge/x86_64-passed-006400.svg?style=flat)](#) | | Debian | Ubuntu | Vivid | [![x86_64](http://img.shields.io/badge/x86_64-passed-006400.svg?style=flat)](#) | - ## Requirements - ansible >= 1.9.6 - ## Role Variables - **influxdb_apt_dependencies**: packages needed to be able to run this playbook or install [InfluxDB][influxdb]. - **influxdb_configuration**: the contents of the [InfluxDB][influxdb] configuration file. -- **influxdb_admin_port**: the port where the [InfluxDB][influxdb] admin interface will be running. - **influxdb_conf_file**: the location where the [InfluxDB][influxdb] is located. - **influxdb_group**: the [InfluxDB][influxdb] group. - **influxdb_http_port**: the port where the [InfluxDB][influxdb] HTTP API will be running. +- **influxdb_ifql_port**: the port where the [InfluxDB][influxdb] ifql RPC service will be running. +- **influxdb_rpc_port**: the port where the [InfluxDB][influxdb] RPC service will be running. +- **influxdb_udp_port**: the port where the [InfluxDB][influxdb] UDP listener will be running. - **influxdb_user**: the [InfluxDB][influxdb] user. - **influxdb_version**: the [InfluxDB][influxdb] version to be installed. Unless stated otherwise a default value is provided for each of the variables mentioned above in the `defaults` directory. - ## Dependencies None. - ## Playbooks - hosts: servers roles: - role: ansiblebit.influxdb - ## Tags - **configuration**: configuration tasks. @@ -60,7 +57,6 @@ None. - **installation**: installation tasks. - **validation**: task to validate role variables. - ## Test To run the tests you will need to install: @@ -70,13 +66,13 @@ To run the tests you will need to install: To run all tests against all pre-defined OS/distributions * ansible versions: -``` -$ tox +```bash +tox ``` To run tests for `trusty64`: -``` +```bash $ cd tests $ bash test_idempotence.sh --box trusty64.vagrant.dev # log file will be stores under tests/log @@ -84,7 +80,7 @@ $ bash test_idempotence.sh --box trusty64.vagrant.dev To perform debugging on a specific environment: -``` +```bash $ cd tests $ vagrant up trusty64.vagrant.dev @@ -95,22 +91,10 @@ $ vagrant provision trusty64.vagrant.dev $ vagrant ssh trusty64.vagrant.dev ``` - ## Links - [[InfluxDB][influxdb] : Introduction > Installation](https://docs.influxdata.com/influxdb/v0.13/introduction/installation/) - -## License - -[BSD][license] - - -## Author Information - -- [steenzout][steenzout] - - [ansible]: https://www.ansible.com "Ansible" [license]: https://github.com/ansiblebit/influxdb/blob/master/LICENSE "BSD license" [influxdb]: https://influxdata.com "InfluxDB" From 6a33ca462e508b96568d7f64dee18c0ae5bd55d4 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 9 Oct 2018 22:09:22 -0600 Subject: [PATCH 5/8] defaults: updated variables. --- defaults/main.yml | 589 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 538 insertions(+), 51 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 89d30c7..87a56b2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,81 +5,568 @@ # influxdb_configuration: | - reporting-disabled = false + ### Welcome to the InfluxDB configuration file. + + # The values in this file override the default values used by the system if + # a config option is not specified. The 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. + + # Once every 24 hours InfluxDB will report usage data to usage.influxdata.com + # The data includes a random ID, os, arch, version, the number of series and other + # usage data. No data from user databases is ever transmitted. + # Change this option to true to disable reporting. + # reporting-disabled = false + + # Bind address to use for the RPC service for backup and restore. + bind-address = "127.0.0.1:{{ influxdb_rpc_port }}" + + ### + ### [meta] + ### + ### Controls the parameters for the Raft consensus group that stores metadata + ### about the InfluxDB cluster. + ### [meta] - dir = "/var/lib/influxdb/meta" - lease-duration = "1m0s" - logging-enabled = true - pprof-enabled = false - retention-autocreate = true + # Where the metadata/raft database is stored + dir = "/var/lib/influxdb/meta" + + # Automatically create a default retention policy when creating a database. + # retention-autocreate = true + + # If log messages are printed 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. "dir" may need to be changed to a suitable place + ### for your system, but the WAL settings are an advanced configuration. The + ### defaults should work for most systems. + ### [data] - data-logging-enabled = true - dir = "/var/lib/influxdb/data" - enabled = true - wal-dir = "/var/lib/influxdb/wal" - wal-logging-enabled = true - - [cluster] - max-concurrent-queries = 0 - max-select-buckets = 0 - max-select-point = 0 - max-select-series = 0 - query-timeout = "0s" - shard-writer-timeout = "5s" - write-timeout = "10s" + # The directory where the TSM storage engine stores TSM files. + dir = "/var/lib/influxdb/data" + + # The directory where the TSM storage engine stores WAL files. + wal-dir = "/var/lib/influxdb/wal" + + # The amount of time that a write will wait before fsyncing. A duration + # greater than 0 can be used to batch up multiple fsync calls. This is useful for slower + # disks or when WAL write contention is seen. A value of 0s fsyncs every write to the WAL. + # Values in the range of 0-100ms are recommended for non-SSD disks. + # wal-fsync-delay = "0s" + + + # The type of shard index to use for new shards. The default is an in-memory index that is + # recreated at startup. A value of "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. Turning + # this on can provide more useful output for debugging tsm engine issues. + # trace-logging-enabled = false + + # Whether queries should be logged before execution. Very useful for troubleshooting, but will + # log any sensitive data contained within a query. + # query-log-enabled = true + + # Settings for the TSM engine + + # CacheMaxMemorySize is the maximum size a shard's cache can + # reach before it starts rejecting writes. + # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k). + # Values without a size suffix are in bytes. + # cache-max-memory-size = "1g" + + # CacheSnapshotMemorySize is the size at which the engine will + # snapshot the cache and write it to a TSM file, freeing up memory + # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k). + # Values without a size suffix are in bytes. + # cache-snapshot-memory-size = "25m" + + # CacheSnapshotWriteColdDuration is the length of time at + # which the engine will snapshot the cache and write it to + # a new TSM file if the shard hasn't received writes or deletes + # cache-snapshot-write-cold-duration = "10m" + + # CompactFullWriteColdDuration is the duration at which the engine + # will compact all TSM files in a shard if it hasn't received a + # write or delete + # compact-full-write-cold-duration = "4h" + + # The maximum number of concurrent full and level compactions that can run at one time. A + # value of 0 results in 50% of runtime.GOMAXPROCS(0) used at runtime. Any number greater + # than 0 limits compactions to that value. This setting does not apply + # to cache snapshotting. + # max-concurrent-compactions = 0 + + # The 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" + + # The maximum series allowed per database before writes are dropped. This limit can prevent + # high cardinality issues at the database level. This limit can be disabled by setting it to + # 0. + # max-series-per-database = 1000000 + + # The maximum number of tag values per tag that are allowed before writes are dropped. This limit + # can prevent high cardinality tag values from being written to a measurement. This limit can be + # disabled by setting it to 0. + # max-values-per-tag = 100000 + + # If true, then the mmap advise value MADV_WILLNEED will be provided to the kernel with respect to + # TSM files. This setting has been found to be problematic on some kernels, and defaults to off. + # It might help users who have slow disks in some cases. + # tsm-use-madv-willneed = false + + ### + ### [coordinator] + ### + ### Controls the clustering service configuration. + ### + + [coordinator] + # The default time a write request will wait until a "timeout" error is returned to the caller. + # write-timeout = "10s" + + # The maximum number of concurrent queries allowed to be executing at one time. If a query is + # executed and exceeds this limit, an error is returned to the caller. This limit can be disabled + # by setting it to 0. + # max-concurrent-queries = 0 + + # The maximum time a query will is allowed to execute before being killed by the system. This limit + # can help prevent run away queries. Setting the value to 0 disables the limit. + # query-timeout = "0s" + + # The time threshold when a query will be logged as a slow query. This limit can be set to help + # discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging. + # log-queries-after = "0s" + + # The maximum number of points a SELECT can process. A value of 0 will make + # the maximum point count unlimited. This will only be checked every second so queries will not + # be aborted immediately when hitting the limit. + # max-select-point = 0 + + # The maximum number of series a SELECT can run. A value of 0 will make the maximum series + # count unlimited. + # max-select-series = 0 + + # The maxium number of group by time bucket a SELECT can create. A value of zero will max the maximum + # number of buckets unlimited. + # max-select-buckets = 0 + + ### + ### [retention] + ### + ### Controls the enforcement of retention policies for evicting old data. + ### [retention] - enabled = true - check-interval = "30m" + # Determines whether retention policy enforcement enabled. + # enabled = true + + # The interval of time when 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-precreation] - enabled = true - advance-period = "30m" - check-interval = "10m" + # Determines whether shard pre-creation service is enabled. + # enabled = true + + # The interval of time when the check to pre-create new shards runs. + # check-interval = "10m" + + # The default period ahead of the endtime of a shard group that its successor + # group is created. + # advance-period = "30m" + + ### + ### 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. In all cases the + ### this retention policy is configured as the default for the database. [monitor] - store-database = "_internal" - store-enabled = true - store-interval = "10s" + # Whether to record statistics internally. + # store-enabled = true - [admin] - enabled = true - bind-address = ":{{ influxdb_admin_port }}" - https-certificate = "/etc/ssl/influxdb.pem" - https-enabled = false + # The destination database for recorded statistics + # store-database = "_internal" + + # The 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. + ### [http] - enabled = true - auth-enabled = false - bind-address = ":{{ influxdb_http_port }}" - https-certificate = "/etc/ssl/influxdb.pem" - https-enabled = false - log-enabled = true - max-row-limit = 10000 - pprof-enabled = false - write-tracing = false + # Determines whether HTTP endpoint is enabled. + # enabled = true + + # The bind address used by the HTTP service. + bind-address = ":{{ influxdb_http_port }}" + + # 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 = "" + + # Determines whether detailed write logging is enabled. + # write-tracing = false + + # Determines whether the pprof endpoint is enabled. This endpoint is used for + # troubleshooting and monitoring. + # pprof-enabled = true + + # Enables a pprof endpoint that binds to localhost:6060 immediately on startup. + # This is only needed to debug startup issues. + # debug-pprof-enabled = false + + # Determines whether HTTPS is enabled. + # https-enabled = false + + # The SSL certificate to use when HTTPS is enabled. + # 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 = "" + + # The default chunk size for result sets that should be chunked. + # max-row-limit = 0 + + # The maximum number of HTTP connections that may be open at once. New connections that + # would exceed this limit are dropped. Setting this value to 0 disables the limit. + # max-connection-limit = 0 + + # Enable http service over unix domain socket + # unix-socket-enabled = false + + # The path of the unix domain socket. + # bind-socket = "/var/run/influxdb.sock" + + # The maximum size of a client request body, in bytes. Setting this value to 0 disables the limit. + # max-body-size = 25000000 + + # The maximum number of writes processed concurrently. + # Setting this to 0 disables the limit. + # max-concurrent-write-limit = 0 + + # The maximum number of writes queued for processing. + # Setting this to 0 disables the limit. + # max-enqueued-write-limit = 0 + + # The maximum duration for a write to wait in the queue to be processed. + # Setting this to 0 or setting max-concurrent-write-limit to 0 disables the limit. + # enqueued-write-timeout = 0 + + + ### + ### [ifql] + ### + ### Configures the ifql RPC API. + ### + + [ifql] + # Determines whether the RPC service is enabled. + # enabled = true + + # Determines whether additional logging is enabled. + # log-enabled = true + + # The bind address used by the ifql RPC service. + bind-address = ":{{ influxdb_ifql_port }}" + + + ### + ### [logging] + ### + ### Controls how the logger emits logs to the output. + ### + + [logging] + # Determines which log encoder to use for logs. Available options + # are auto, logfmt, and json. auto will use a more a more user-friendly + # output format if the output terminal is a TTY, but the format is not as + # easily machine-readable. When the output is a non-TTY, auto will use + # logfmt. + # format = "auto" + + # Determines which level of logs will be emitted. The available levels + # are error, warn, info, and debug. Logs that are equal to or above the + # specified level will be emitted. + # level = "info" + + # Suppresses the logo output that is printed when the program is started. + # The logo is 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. + ### + + [subscriber] + # Determines whether the subscriber service is enabled. + # enabled = true + + # The default timeout for HTTP writes to subscribers. + # http-timeout = "30s" + + # Allows insecure HTTPS connections to subscribers. This is useful when testing with self- + # signed certificates. + # insecure-skip-verify = false + + # The path to the PEM encoded CA certs file. If the empty string, the default system certs will be used + # ca-certs = "" + + # The number of writer goroutines processing the write channel. + # write-concurrency = 40 + + # The number of in-flight writes buffered in the write channel. + # write-buffer-size = 1000 + + + ### + ### [[graphite]] + ### + ### Controls one or many listeners for Graphite data. + ### [[graphite]] - enabled = false + # Determines whether the graphite endpoint is enabled. + # enabled = false + # database = "graphite" + # retention-policy = "" + # bind-address = ":2003" + # protocol = "tcp" + # consistency-level = "one" + + # 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 = "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 + # 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 + # 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 + # enabled = false + bind-address = ":{{ influxdb_udp_port }}" + # 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] - log-enabled = true - enabled = true + # 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" + -influxdb_admin_port: 8083 influxdb_conf_file: /etc/influxdb/influxdb.conf influxdb_group: influxdb -influxdb_http_port: 8086 +influxdb_ifql_port: 8082 +influxdb_rpc_port: 8088 +influxdb_udp_port: 8089 influxdb_user: influxdb -influxdb_version: 0.13.0 +influxdb_version: 1.6.3 From 78b6b8d48d372cf7a0db1edde3c4eeb4b0d12b0f Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 9 Oct 2018 22:10:01 -0600 Subject: [PATCH 6/8] tasks: updated variables. --- tasks/debug.yml | 5 +++-- tasks/validation.yml | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tasks/debug.yml b/tasks/debug.yml index 5702124..4acf18c 100644 --- a/tasks/debug.yml +++ b/tasks/debug.yml @@ -10,10 +10,11 @@ with_items: - ansible_distribution - ansible_distribution_release - - influxdb_admin_port - influxdb_apt_dependencies - influxdb_conf_file - influxdb_group - influxdb_http_port + - influxdb_ifql_port + - influxdb_rpc_port + - influxdb_udp_port - influxdb_user - diff --git a/tasks/validation.yml b/tasks/validation.yml index 167eae0..a9cbd02 100644 --- a/tasks/validation.yml +++ b/tasks/validation.yml @@ -9,9 +9,11 @@ msg="{{ item }} is a mandatory variable" when: item is not defined with_items: - - influxdb_admin_port - influxdb_conf_file + - influxdb_configuration - influxdb_group - influxdb_http_port + - influxdb_ifql_port + - influxdb_rpc_port + - influxdb_udp_port - influxdb_user - From 66c06e33f3455b97191db3c0c006ff23ed192e66 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 9 Oct 2018 22:12:36 -0600 Subject: [PATCH 7/8] defaults: added influxdb_http_port. --- defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/main.yml b/defaults/main.yml index 87a56b2..ba9ec6c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -565,6 +565,7 @@ influxdb_configuration: | influxdb_conf_file: /etc/influxdb/influxdb.conf influxdb_group: influxdb +influxdb_http_port: 8086 influxdb_ifql_port: 8082 influxdb_rpc_port: 8088 influxdb_udp_port: 8089 From 6add81404a8d5484be95a23b3352bbfc8ae687b0 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 9 Oct 2018 22:14:27 -0600 Subject: [PATCH 8/8] tests: mark task as unchanged. --- tests/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test.yml b/tests/test.yml index 9a3eea3..9de83e6 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -7,6 +7,7 @@ tasks: - raw: sudo apt-get update -qq && sudo apt-get install -qq python2.7 + changed_when: no when: playbook_python2 is defined and playbook_python2