Ansible Role influxdb
This role installs and configures InfluxDB.
Mandatory Requirements
Install
influxdb
andrequests
into a Python 3 virtual environment in/opt/python-venv/influxdb
. This can be done using the linuxfabrik.lfops.python_venv role.Enable the official InfluxDB repository. This can be done using the linuxfabrik.lfops.repo_influxdb role.
Mandatory Role Variables
Variable |
Description |
---|---|
|
The user account for the database administrator. Subkeys:
|
Example:
# mandatory
influxdb__admin_login:
username: 'influxdb-admin'
password: 'linuxfabrik'
# old_password: 'previous-linuxfabrik'
Optional Role Variables
Variable |
Description |
Default Value |
---|---|---|
|
Controls whether queries are logged when executed by the continuous query service. Make sure to also set |
|
|
Interval for how often continuous queries will be checked if they need to run. |
|
|
Determines whether HTTPS is enabled or not. Also have a look at
|
unset |
|
The time threshold when a query will be logged as a slow query. Setting the value to 0 disables the slow query logging. |
|
|
Determines which level of logs will be emitted. Possible options: |
|
|
Enables or disables the influxdb service, analogous to |
|
|
List of InfluxDB databases that should be created or deleted. |
|
|
List of InfluxDB users that should be created, updated or deleted. |
|
|
Enables or disables the influxdb service, analogous to |
|
|
If set to |
|
Example:
# optional
influxdb__conf_continuous_queries_log_enabled: true
influxdb__conf_continuous_queries_run_interval: '1s'
influxdb__conf_https:
certificate_path: '/etc/ssl/ssl-certificate.crt'
private_key_path: '/etc/ssl/ssl-certificate.key'
influxdb__conf_log_queries_after: '0s'
influxdb__conf_logging_level: 'warn'
influxdb__dump_timer_enabled: true
influxdb__databases__host_var:
- name: 'database1'
state: 'present'
retention: '216d'
influxdb__users__host_var:
- name: 'user1'
password: 'linuxfabrik'
state: 'present'
admin: false
grants:
- database: 'database1'
privilege: 'ALL'
influxdb__service_enabled: true
influxdb__validate_certs: false