DEBOPS.INFLUXDB_SERVER(5)

NAME
debops.influxdb_server - Manage InfluxDB service using Ansible

SYNOPSIS

debops run service/influxdb_server [--limit group,host,...] [--diff] [--check] [--tags tag1,tag2,...] [--skip-tags tag1,tag2,...] [<ansible-playbook options>] ...

DESCRIPTION

InfluxDB <https://en.wikipedia.org/wiki/InfluxDB> is an open-source time series database (TSDB) developed by InfluxData. It is written in Go and optimized for fast, high-availability storage and retrieval of time series data in fields such as operations monitoring, application metrics, Internet of Things sensor data, and real-time analytics. Ansible roles debops.influxdb and debops.influxdb_server allow you to manage a InfluxDB server and / or access it remotely from other hosts.

The debops.influxdb_server role is the "server" part - it installs influxdb Debian package, and configures access to the database from root admin account. After that, you can use debops.influxdb role to manage databases and user accounts on the server.

GETTING STARTED

  Example inventory

To install InfluxDB on a host, you need to add it to [debops_service_influxdb_server] Ansible group:

[debops_service_influxdb_server]
database-host

This will install influxdb package, configure the server to listen on all interfaces for new connections, and install autoinfluxdbbackup script to automatically create daily, weekly and monthly backups of the database.

  Example playbook

Here's an example Ansible playbook that uses the debops.influxdb_server role:

---
- name: Manage InfluxDB server
  collections: [ 'debops.debops', 'debops.roles01',
                 'debops.roles02', 'debops.roles03' ]
  hosts: [ 'debops_service_influxdb_server' ]
  become: True
  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'
  roles:
    - role: keyring
      tags: [ 'role::keyring', 'skip::keyring', 'role::influxdata' ]
      keyring__dependent_apt_keys:
        - '{{ influxdata__keyring__dependent_apt_keys }}'
    - role: etc_services
      tags: [ 'role::etc_services', 'skip::etc_services' ]
      etc_services__dependent_list:
        - '{{ influxdb_server__etc_services__dependent_list }}'
    - role: ferm
      tags: [ 'role::ferm', 'skip::ferm' ]
      ferm__dependent_rules:
        - '{{ influxdb_server__ferm__dependent_rules }}'
    - role: python
      tags: [ 'role::python', 'skip::python', 'role::influxdb_server' ]
      python__dependent_packages3:
        - '{{ influxdb_server__python__dependent_packages3 }}'
      python__dependent_packages2:
        - '{{ influxdb_server__python__dependent_packages2 }}'
    - role: influxdata
      tags: [ 'role::influxdata', 'skip::influxdata' ]
      influxdata__dependent_packages:
        - '{{ influxdb_server__influxdata__dependent_packages }}'
    - role: influxdb_server
      tags: [ 'role::influxdb_server', 'skip::influxdb_server' ]

  Remote access to the database

If you want to allow connections from remote hosts to the InfluxDB server, you need specify the list of IP addresses or CIDR networks which can connect to the daemon:

influxdb_server__allow: [ '192.0.2.0/24', '2001:db8:3232::/64' ]

  Database and user management

debops.influxdb_server is not meant to be used to manage databases and user accounts. You should use debops.influxdb role instead, which was designed specifically for this purpose.

DEFAULT VARIABLE DETAILS

Some of debops.influxdb_server default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.

  influxdb_server__default_configuration

Controls how the HTTP endpoints are configured. These are the primary mechanism for getting data into and out of InfluxDB.

influxdb_server__default_configuration:
  - name: 'http'
    options:
      - bind-address: '"{{ influxdb_server__bind }}:{{ influxdb_server__port }}"'
      - https-enabled: '{{ "true" if influxdb_server__pki else "false" }}'
      - auth-enabled: 'true'

  Syntax

The variables are YAML lists, each list entry is a YAML dictionary that uses specific parameters:

name
    Required. This parameter defines the option name, and it needs to be unique in a given configuration file

options
    Optional. A YAML list of influxdb configuration options defined in the configuration file.

    Each element of the options list is a YAML dictionary with specific parameters.

    For more information, refer to the InfluxDB documentation at https://docs.influxdata.com/influxdb/latest/reference/config-options/

  Examples

influxdb_server__default_configuration:
  - name: 'global'
    options:
      - reporting-disabled: 'true'
      - bind-address: '"{{ influxdb_server__rpc_bind }}:{{ influxdb_server__rpc_port }}"'
  - name: 'meta'
    options:
      - dir: '"{{ influxdb_server__directory }}/meta"'
  - name: 'data'
    options:
      - dir: '"{{ influxdb_server__directory }}/data"'
      - wal-dir: '"{{ influxdb_server__directory }}/wal"'
  - name: 'coordinator'
    options: []
  - name: 'retention'
    options: []
  - name: 'shard-precreation'
    options: []
  - name: 'monitor'
    options: []
  - name: 'http'
    options:
      - bind-address: '"{{ influxdb_server__bind }}:{{ influxdb_server__port }}"'
      - https-enabled: '{{ "true" if influxdb_server__pki else "false" }}'
      - auth-enabled: 'true'
  - name: 'logging'
    options: []
  - name: 'subscriber'
    options: []
  - name: 'graphite'
    options: []
  - name: 'collectd'
    options: []
  - name: 'opentsdb'
    options: []
  - name: 'udp'
    options: []
  - name: 'continuous_queries'
    options: []
  - name: 'tls'
    options:
      - min-version: '"tls1.2"'

AUTHOR
Pedro Luis Lopez

COPYRIGHT
2014-2024, Maciej Delmanowski, Nick Janetakis, Robin Schneider and others