diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 23f3bc6e86..f15389bfaf 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -1062,3 +1062,10 @@ distro_python_version_map: { } distro_python_version: "{{ distro_python_version_map[kolla_base_distro] }}" + +########## +# Telegraf +########## +# Configure telegraf to use the docker daemon itself as an input for +# telemetry data. +telegraf_enable_docker_input: "no" diff --git a/ansible/roles/telegraf/templates/telegraf.conf.j2 b/ansible/roles/telegraf/templates/telegraf.conf.j2 index 6d5cad699c..76030cfb94 100644 --- a/ansible/roles/telegraf/templates/telegraf.conf.j2 +++ b/ansible/roles/telegraf/templates/telegraf.conf.j2 @@ -108,3 +108,16 @@ gather_perf_events_statements = true interval_slow = "30m" {% endif %} +{% if telegraf_enable_docker_input | bool %} +[[inputs.docker]] + endpoint = "unix:///var/run/docker.sock" + gather_services = false + container_names = [] + container_name_include = [] + container_name_exclude = [] + timeout = "5s" + perdevice = true + total = false + docker_label_include = [] + docker_label_exclude = [] +{% endif %} diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 006c2adc2e..8e18caaa92 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -585,3 +585,10 @@ # by kolla-ansible. You must first setup an external elasticsearch with 2.3.0. # By default, kolla-ansible deployed mariadb is the used database backend. #freezer_database_backend: "mariadb" + +########## +# Telegraf +########## +# Configure telegraf to use the docker daemon itself as an input for +# telemetry data. +#telegraf_enable_docker_input: "no"