From e3eca391e071cc0ba1c3ac214f4b40e4835ee8ec Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 8 Mar 2022 14:16:14 +0100 Subject: Add filebeat to stream logs into elasticsearch --- app/telemetry/deploy/telemetry-system.hcl | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'app/telemetry/deploy') diff --git a/app/telemetry/deploy/telemetry-system.hcl b/app/telemetry/deploy/telemetry-system.hcl index c9b11b1..16f2a5a 100644 --- a/app/telemetry/deploy/telemetry-system.hcl +++ b/app/telemetry/deploy/telemetry-system.hcl @@ -74,7 +74,7 @@ EOH task "otel" { driver = "docker" config { - image = "otel/opentelemetry-collector-contrib:0.44.0" + image = "otel/opentelemetry-collector-contrib:0.46.0" args = [ "--config=/etc/otel-config.yaml", ] @@ -99,7 +99,7 @@ EOH task "apm" { driver = "docker" config { - image = "docker.elastic.co/apm/apm-server:7.17.0" + image = "docker.elastic.co/apm/apm-server:7.17.1" network_mode = "host" ports = [ "apm" ] args = [ "--strict.perms=false" ] @@ -136,6 +136,30 @@ EOH memory = 40 } } + + task "filebeat" { + driver = "docker" + config { + image = "docker.elastic.co/beats/filebeat:7.17.1" + network_mode = "host" + volumes = [ + "/mnt/ssd/telemetry/filebeat:/usr/share/filebeat/data", + "secrets/filebeat.yml:/usr/share/filebeat/filebeat.yml", + "/var/run/docker.sock:/var/run/docker.sock", + "/var/lib/docker/containers/:/var/lib/docker/containers/:ro", + "/var/log/:/var/log/:ro", + ] + args = [ "--strict.perms=false" ] + privileged = true + } + user = "root" + + + template { + data = file("../config/filebeat.yml") + destination = "secrets/filebeat.yml" + } + } } } -- cgit v1.2.3