ЛР 6: OpenTelemetry, Prometheus, Loki, Tempo и Grafana — на 3

This commit is contained in:
2026-11-20 21:52:10 +03:00
parent 470d9d6f1e
commit dc7745064d
72 changed files with 4684 additions and 44 deletions
+51
View File
@@ -0,0 +1,51 @@
extensions:
health_check:
endpoint: 0.0.0.0:13133
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
limit_mib: 128
spike_limit_mib: 32
batch:
timeout: 1s
send_batch_size: 256
send_batch_max_size: 512
exporters:
prometheus:
endpoint: 0.0.0.0:8889
metric_expiration: 5m
otlphttp/loki:
endpoint: http://loki:3100/otlp
timeout: 3s
sending_queue: {queue_size: 32, num_consumers: 2}
retry_on_failure: {initial_interval: 1s, max_interval: 5s, max_elapsed_time: 20s}
otlp/tempo:
endpoint: tempo:4317
tls: {insecure: true}
timeout: 3s
sending_queue: {queue_size: 32, num_consumers: 2}
retry_on_failure: {initial_interval: 1s, max_interval: 5s, max_elapsed_time: 20s}
service:
extensions: [health_check]
pipelines:
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [prometheus]
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlphttp/loki]
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlp/tempo]
+39
View File
@@ -0,0 +1,39 @@
auth_enabled: false
analytics:
reporting_enabled: false
server:
http_listen_port: 3100
log_level: warn
common:
path_prefix: /loki
replication_factor: 1
ring:
kvstore: {store: inmemory}
storage:
filesystem:
chunks_directory: /loki/chunks
rules_directory: /loki/rules
schema_config:
configs:
- from: 2024-01-01
store: tsdb
object_store: filesystem
schema: v13
index: {prefix: index_, period: 24h}
ingester:
wal:
dir: /loki/wal
flush_on_shutdown: true
compactor:
working_directory: /loki/compactor
retention_enabled: true
delete_request_store: filesystem
limits_config:
allow_structured_metadata: true
retention_period: 48h
otlp_config:
resource_attributes:
ignore_defaults: true
attributes_config:
- action: index_label
attributes: [service.name]
+8
View File
@@ -0,0 +1,8 @@
global:
scrape_interval: 5s
scrape_timeout: 3s
scrape_configs:
- job_name: otel-collector
honor_labels: true
static_configs:
- targets: ['otel-collector:8889']
+24
View File
@@ -0,0 +1,24 @@
server:
http_listen_port: 3200
log_level: warn
usage_report:
reporting_enabled: false
distributor:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
ingester:
max_block_duration: 30s
flush_all_on_shutdown: true
compactor:
compaction:
block_retention: 48h
storage:
trace:
backend: local
wal:
path: /var/tempo/wal
local:
path: /var/tempo/blocks