From 57db3bf0caabafccbb03fa070ee38dc80eea3925 Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Mon, 12 Dec 2022 21:36:47 +0100 Subject: [PATCH] :whale: Add telegraf container for Docker metrics in influxdb All our hosts running docker can put their metrics into our influxdb now. Note: not all docker hosts do this (yet), because the influxdb is currently only reachable from within the local space internal network in our rooms. Link: https://docs.ansible.com/ansible/latest/inventory_guide/intro_patterns.html Link: https://galaxy.ansible.com/lespocky/telegraf_docker_in_docker References: #760 --- group-docker_host.yml | 14 ++++++++++++++ group_vars/docker_host/vault | 11 +++++++++++ requirements.yml | 2 ++ 3 files changed, 27 insertions(+) create mode 100644 group_vars/docker_host/vault diff --git a/group-docker_host.yml b/group-docker_host.yml index 7a338c0..15c2ed9 100644 --- a/group-docker_host.yml +++ b/group-docker_host.yml @@ -4,3 +4,17 @@ roles: - role: docker_setup + +- hosts: docker_host:&location_space + become: true + + roles: + - role: lespocky.telegraf_docker_in_docker + vars: + tdid_conf_dir: "/etc/telegraf" + tdid_influxdb_org: "{{ influxdb_org }}" + tdid_influx_token: "{{ vault_tdid_influx_token }}" + tdid_docker_image: "telegraf:1.24-alpine" + tdid_influxdb_url: "https://influx.n39.eu" + tdid_influxdb_bucket: "system_metrics" + tdid_timezone: "{{ timezone }}" diff --git a/group_vars/docker_host/vault b/group_vars/docker_host/vault new file mode 100644 index 0000000..b343ddb --- /dev/null +++ b/group_vars/docker_host/vault @@ -0,0 +1,11 @@ +$ANSIBLE_VAULT;1.1;AES256 +32316530363561636236376162663963643966336566373964633066326365373234323365376635 +3032376339633462623762313638303066306637323630660a323839333935643761313534646631 +64303438376132303461363664653239373663323433343331363833373331666532303538306433 +3766633837323238320a383461616434326531613532323463393939333331306264663765393761 +35336332336135623834373661323535376264323564383234633435373363343739316234653631 +32336663636632386131316165663766643935633562353235633937666264326537323362633864 +32386264643539356430353837663761356561386162306466643838303462353631346564653432 +33356266666466333132636364643962383030313264336363356439663066346462653466343163 +38666537306464323434366135333433623335396239636461353136663563323934653737336337 +3664393331316162303938626330643137653232653263366461 diff --git a/requirements.yml b/requirements.yml index a733ef5..392bec7 100644 --- a/requirements.yml +++ b/requirements.yml @@ -10,6 +10,8 @@ roles: version: v1.0.0 - src: git+https://github.com/maz3max/ble-keykeeper-role.git version: v1.1.0 + - src: lespocky.telegraf_docker_in_docker + version: v0.2.0 collections: - name: community.grafana