diff options
author | Alex Auvolat <alex@adnab.me> | 2022-03-08 14:16:14 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-03-08 14:16:14 +0100 |
commit | e3eca391e071cc0ba1c3ac214f4b40e4835ee8ec (patch) | |
tree | 69933f1b8bfdf83eb1f25fd24e3b520e7dabee3c /app/telemetry/deploy | |
parent | 27ffee95b894a6a8c8af8a4c32453506229c149e (diff) | |
download | nixcfg-e3eca391e071cc0ba1c3ac214f4b40e4835ee8ec.tar.gz nixcfg-e3eca391e071cc0ba1c3ac214f4b40e4835ee8ec.zip |
Add filebeat to stream logs into elasticsearch
Diffstat (limited to 'app/telemetry/deploy')
-rw-r--r-- | app/telemetry/deploy/telemetry-system.hcl | 28 |
1 files changed, 26 insertions, 2 deletions
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" + } + } } } |