Tento návod popisuje inštaláciu a konfiguráciu jednotlivých OTel komponentov vo forme samostatných procesov pre OS Windows. Sprevádzkovanie OTel stack-u na platforme docker nie je predmetom tohto návodu.
otelcol_<verzia>_windows_amd64.tar.gzc:\otel\collector\otel-config.yaml s nasl. obsahom:extensions:
zpages:
endpoint: localhost:55679
receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
http:
endpoint: localhost:4318
processors:
batch:
memory_limiter:
# 75% of maximum memory up to 2G
limit_mib: 1536
# 25% of limit up to 2G
spike_limit_mib: 512
check_interval: 5s
exporters:
debug:
verbosity: detailed
otlphttp/loki:
endpoint: http://localhost:3100/otlp
otlphttp/tempo:
endpoint: http://localhost:4317/otlp
otlphttp/prometheus:
endpoint: http://localhost:9090/api/v1/otlp
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug, otlphttp/tempo]
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug, otlphttp/prometheus]
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug, otlphttp/loki]
extensions: [zpages] |
Spustenie opentelemetry-collector vykonáme príkazom otelcol.exe --config=otel-config.yaml v adresári c:\otel\collector\
c:\otel\loki\loki-config.yaml s nasl. obsahom:# This is a complete configuration to deploy Loki backed by the filesystem.
# The index will be shipped to the storage via tsdb-shipper.
auth_enabled: false
server:
http_listen_port: 3100
common:
ring:
instance_addr: 127.0.0.1
kvstore:
store: inmemory
replication_factor: 1
path_prefix: /tmp/loki
schema_config:
configs:
- from: 2020-05-15
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
storage_config:
filesystem:
directory: /tmp/loki/chunks |
Spustenie loki vykonáme príkazom loki-windows-amd64.exe -config.file=config.yaml v adresári c:\otel\loki\
Príklady ďalšej konfigurácie loki sú uvedené na stránke https://grafana.com/docs/loki/latest/configure/examples/configuration-examples/
c:\otel\tempo\Spustenie tempo vykonáme príkazom tempo.exe -storage.trace.backend local -storage.trace.local.path ./ v adresári c:\otel\tempo\
prometheus-<verzia>.windows-amd64.zipc:\otel\prometheus\Spustenie vykonáme príkazom prometheus.exe v adresári c:\otel\prometheus\
c:\otel\grafana\Spustenie grafana servera vykonáme príkazom grafana-server.exe v adresári c:\otel\grafana\bin
V grafana je potrebné nakonfigurovať zdroje dát (Data sources):
loki
tempo
prometheus