---
influxdb_services:
  influxdb:
    container_name: influxdb
    group: influxdb
    enabled: true
    image: "{{ influxdb_image_full }}"
    volumes: "{{ influxdb_default_volumes + influxdb_extra_volumes }}"
    dimensions: "{{ influxdb_dimensions }}"
    haproxy:
      influxdb_http:
        enabled: "{{ enable_influxdb }}"
        mode: "http"
        external: false
        port: "{{ influxdb_http_port }}"

####################
# InfluxDB
####################

# Enable the disk based time series index (recommended for all users). For
# more information see here:
# https://docs.influxdata.com/influxdb/v1.7/concepts/time-series-index/
influxdb_enable_tsi: True

####################
# Docker
####################
influxdb_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ docker_image_name_prefix }}influxdb"
influxdb_tag: "{{ openstack_tag }}"
influxdb_image_full: "{{ influxdb_image }}:{{ influxdb_tag }}"
influxdb_dimensions: "{{ default_container_dimensions }}"

influxdb_default_volumes:
  - "{{ node_config_directory }}/influxdb/:{{ container_config_directory }}/:ro"
  - "/etc/localtime:/etc/localtime:ro"
  - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
  - "{{ influxdb_datadir_volume }}:/var/lib/influxdb"
  - "kolla_logs:/var/log/kolla/"
influxdb_extra_volumes: "{{ default_extra_volumes }}"
