From bebff26bfc6dd9b9e4ffae3775f02ed6825355df Mon Sep 17 00:00:00 2001 From: Weifeng Wang Date: Mon, 25 Mar 2024 21:17:15 +0800 Subject: [PATCH] update traces Signed-off-by: Weifeng Wang --- .../common/compose-include/loki.yaml | 26 +++++++++++++++++++ .../microservices-mode/traces/compose.yaml | 2 ++ .../monolithic-mode/traces/compose.yaml | 2 ++ 3 files changed, 30 insertions(+) create mode 100644 docker-compose/common/compose-include/loki.yaml diff --git a/docker-compose/common/compose-include/loki.yaml b/docker-compose/common/compose-include/loki.yaml new file mode 100644 index 00000000..e530a998 --- /dev/null +++ b/docker-compose/common/compose-include/loki.yaml @@ -0,0 +1,26 @@ +services: + loki: + labels: + - logs.agent.grafana.com/log-format=json + depends_on: + minio: + condition: service_healthy + image: ${LOKI_IMAGE:-docker.io/grafana/loki:2.9.6} + volumes: + - ../config/loki:/etc/loki + command: + - -config.file=/etc/loki/monolithic-mode-logs.yaml + - -target=all + - -config.expand-env=true + healthcheck: + test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3100/ready || exit 1" ] + interval: 10s + timeout: 5s + retries: 10 + # expose 33100 port so we can directly access loki inside container + ports: + - "33100:3100" + networks: + default: + aliases: + - loki-memberlist diff --git a/docker-compose/microservices-mode/traces/compose.yaml b/docker-compose/microservices-mode/traces/compose.yaml index 442481a8..bf28c48a 100644 --- a/docker-compose/microservices-mode/traces/compose.yaml +++ b/docker-compose/microservices-mode/traces/compose.yaml @@ -10,6 +10,7 @@ include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - path: ../../common/compose-include/mimir.yaml + - path: ../../common/compose-include/loki.yaml - path: ../../common/compose-include/grafana-agent.yaml - path: ../../common/compose-include/grafana.yaml @@ -34,6 +35,7 @@ services: - ../../common/config/nginx/nginx.conf:/etc/nginx/templates/nginx.conf.template - ../../common/config/tempo/gateway_tempo.conf:/etc/nginx/templates/gateway_tempo.conf.template - ../../common/config/mimir/gateway_mimir.conf:/etc/nginx/templates/gateway_mimir.conf.template + - ../../common/config/loki/gateway_loki.conf:/etc/nginx/templates/gateway_loki.conf.template environment: - TEMPO_DISTRIBUTOR_HOST=distributor - TEMPO_INGESTER_HOST=ingester diff --git a/docker-compose/monolithic-mode/traces/compose.yaml b/docker-compose/monolithic-mode/traces/compose.yaml index ff0c35e6..aa8fc7f1 100644 --- a/docker-compose/monolithic-mode/traces/compose.yaml +++ b/docker-compose/monolithic-mode/traces/compose.yaml @@ -10,6 +10,7 @@ include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - path: ../../common/compose-include/mimir.yaml + - path: ../../common/compose-include/loki.yaml - path: ../../common/compose-include/grafana.yaml x-environment: &jaeger-environment @@ -72,6 +73,7 @@ services: - ../../common/config/nginx/nginx.conf:/etc/nginx/templates/nginx.conf.template - ../../common/config/tempo/gateway_tempo.conf:/etc/nginx/templates/gateway_tempo.conf.template - ../../common/config/mimir/gateway_mimir.conf:/etc/nginx/templates/gateway_mimir.conf.template + - ../../common/config/loki/gateway_loki.conf:/etc/nginx/templates/gateway_loki.conf.template healthcheck: test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3200/ || exit 1" ] interval: 10s