From 0edb4c940535c91f777c60c395f8befdd9e6d283 Mon Sep 17 00:00:00 2001 From: Yevgeniy Ulyantsev Date: Wed, 28 Jan 2026 22:46:56 +0300 Subject: [PATCH] init --- docker-compose.yml | 56 +++++++++++++++++++++++++++++++++++++++ loki/loki.yaml | 26 ++++++++++++++++++ otel/otel-collector.yaml | 35 ++++++++++++++++++++++++ prometheus/prometheus.yml | 7 +++++ tempo/tempo.yaml | 15 +++++++++++ 5 files changed, 139 insertions(+) create mode 100644 docker-compose.yml create mode 100644 loki/loki.yaml create mode 100644 otel/otel-collector.yaml create mode 100644 prometheus/prometheus.yml create mode 100644 tempo/tempo.yaml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..04a3bcb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,56 @@ +version: "3.8" + +services: + prometheus: + image: prom/prometheus:v2.49.1 + volumes: + - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro + command: + - "--config.file=/etc/prometheus/prometheus.yml" + ports: + - "9090:9090" + + loki: + image: grafana/loki:2.8.3 + volumes: + - ./loki/loki.yaml:/etc/loki/loki.yaml:ro + - loki-data:/loki + command: -config.file=/etc/loki/loki.yaml + ports: + - "3100:3100" + + tempo: + image: grafana/tempo:2.3.1 + volumes: + - ./tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro + - tempo-data:/var/tempo + command: -config.file=/etc/tempo/tempo.yaml + ports: + - "3200:3200" + - "4318:4318" + + otel-collector: + image: otel/opentelemetry-collector-contrib:0.93.0 + volumes: + - ./otel/otel-collector.yaml:/etc/otel/otel-collector.yaml:ro + command: + - "--config=/etc/otel/otel-collector.yaml" + ports: + - "4317:4317" + - "4318:4318" + - "8888:8888" + + grafana: + image: grafana/grafana:10.3.1 + environment: + GF_SECURITY_ADMIN_USER: admin + GF_SECURITY_ADMIN_PASSWORD: admin + volumes: + - grafana-data:/var/lib/grafana + ports: + - "3111:3000" + +volumes: + grafana-data: + loki-data: + tempo-data: diff --git a/loki/loki.yaml b/loki/loki.yaml new file mode 100644 index 0000000..4ae0835 --- /dev/null +++ b/loki/loki.yaml @@ -0,0 +1,26 @@ +auth_enabled: false + +server: + http_listen_port: 3100 + +ingester: + lifecycler: + ring: + kvstore: + store: inmemory + wal: + enabled: false + +schema_config: + configs: + - from: 2020-10-15 + store: boltdb-shipper + object_store: filesystem + schema: v11 + index: + prefix: index_ + period: 24h + +storage_config: + filesystem: + directory: /loki/chunks diff --git a/otel/otel-collector.yaml b/otel/otel-collector.yaml new file mode 100644 index 0000000..817908e --- /dev/null +++ b/otel/otel-collector.yaml @@ -0,0 +1,35 @@ +receivers: + otlp: + protocols: + grpc: + http: + +processors: + batch: + +exporters: + prometheus: + endpoint: 0.0.0.0:8888 + + otlphttp/loki: + endpoint: http://loki:3100/otlp + + otlphttp/tempo: + endpoint: http://tempo:4318/v1/traces + +service: + pipelines: + metrics: + receivers: [otlp] + processors: [batch] + exporters: [prometheus] + + logs: + receivers: [otlp] + processors: [batch] + exporters: [otlphttp/loki] + + traces: + receivers: [otlp] + processors: [batch] + exporters: [otlphttp/tempo] diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml new file mode 100644 index 0000000..0bd70c3 --- /dev/null +++ b/prometheus/prometheus.yml @@ -0,0 +1,7 @@ +global: + scrape_interval: 15s + +scrape_configs: + - job_name: otel-collector + static_configs: + - targets: ['otel-collector:8888'] diff --git a/tempo/tempo.yaml b/tempo/tempo.yaml new file mode 100644 index 0000000..e0041ae --- /dev/null +++ b/tempo/tempo.yaml @@ -0,0 +1,15 @@ +server: + http_listen_port: 3200 + +distributor: + receivers: + otlp: + protocols: + http: + grpc: + +storage: + trace: + backend: local + local: + path: /var/tempo/traces