From 03a4146a6298950e862b3f580f460025969e6d1a Mon Sep 17 00:00:00 2001 From: vasyukova Date: Sat, 24 Oct 2026 22:18:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B0=20.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../provisioning/dashboards/provider.yaml | 9 ++++ .../provisioning/datasources/datasources.yaml | 35 ++++++++++++++++ infra/loki/loki.yaml | 42 +++++++++++++++++++ infra/tempo/tempo.yaml | 34 +++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 infra/grafana/provisioning/dashboards/provider.yaml create mode 100644 infra/grafana/provisioning/datasources/datasources.yaml create mode 100644 infra/loki/loki.yaml create mode 100644 infra/tempo/tempo.yaml diff --git a/infra/grafana/provisioning/dashboards/provider.yaml b/infra/grafana/provisioning/dashboards/provider.yaml new file mode 100644 index 00000000..d330425a --- /dev/null +++ b/infra/grafana/provisioning/dashboards/provider.yaml @@ -0,0 +1,9 @@ +apiVersion: 1 + +providers: + - name: messenger + folder: Messenger + type: file + options: + path: /etc/grafana/provisioning/dashboards/json + foldersFromFilesStructure: false \ No newline at end of file diff --git a/infra/grafana/provisioning/datasources/datasources.yaml b/infra/grafana/provisioning/datasources/datasources.yaml new file mode 100644 index 00000000..4a94656e --- /dev/null +++ b/infra/grafana/provisioning/datasources/datasources.yaml @@ -0,0 +1,35 @@ +apiVersion: 1 + +datasources: + - name: Prometheus + type: prometheus + access: proxy + url: http://prometheus:9090 + isDefault: true + editable: false + + - name: Loki + type: loki + access: proxy + url: http://loki:3100 + editable: false + jsonData: + derivedFields: + - name: TraceID + matcherRegex: 'trace_id=([a-f0-9]+)' + datasourceUid: tempo + url: "$${__value.raw}" + + - name: Tempo + uid: tempo + type: tempo + access: proxy + url: http://tempo:3200 + editable: false + jsonData: + tracesToLogsV2: + datasourceUid: loki + tags: + - key: service.name + value: service_name + filterByTraceID: true \ No newline at end of file diff --git a/infra/loki/loki.yaml b/infra/loki/loki.yaml new file mode 100644 index 00000000..d8f06c62 --- /dev/null +++ b/infra/loki/loki.yaml @@ -0,0 +1,42 @@ +auth_enabled: false + +server: + http_listen_port: 3100 + grpc_listen_port: 9096 + log_level: warn + +common: + path_prefix: /loki + storage: + filesystem: + chunks_directory: /loki/chunks + rules_directory: /loki/rules + replication_factor: 1 + ring: + instance_addr: 127.0.0.1 + kvstore: + store: inmemory + +schema_config: + configs: + - from: 2024-01-01 + store: tsdb + object_store: filesystem + schema: v13 + index: + prefix: index_ + period: 24h + +limits_config: + retention_period: 168h + reject_old_samples: true + reject_old_samples_max_age: 168h + allow_structured_metadata: true + +compactor: + working_directory: /loki/compactor + delete_request_store: filesystem + retention_enabled: true + +analytics: + reporting_enabled: false \ No newline at end of file diff --git a/infra/tempo/tempo.yaml b/infra/tempo/tempo.yaml new file mode 100644 index 00000000..1b58c904 --- /dev/null +++ b/infra/tempo/tempo.yaml @@ -0,0 +1,34 @@ +server: + http_listen_port: 3200 + grpc_listen_port: 9095 + log_level: warn + +distributor: + receivers: + otlp: + protocols: + http: + endpoint: 0.0.0.0:4318 + grpc: + endpoint: 0.0.0.0:4317 + +ingester: + trace_idle_period: 10s + max_block_bytes: 1048576 + max_block_duration: 5m + +compactor: + compaction: + block_retention: 24h + +storage: + trace: + backend: local + local: + path: /var/tempo/traces + wal: + path: /var/tempo/wal + +metrics_generator: + storage: + path: /var/tempo/generator/wal \ No newline at end of file