Files
lgtm-stack/config/otel-collector.yaml
T
GamingChaos c8118ee474 Update OTEL collector config and docker setup
- Use ssl/ certificates for gRPC and HTTP TLS
- Add Prometheus scrape configs for local and gitea targets
  Keep matrix and caddy scrape targets commented for future use
- Switch exporters to OTLP gRPC and enable TLS certs
- Remove Tempo, Mimir, Loki exporters
- Use batch + resource_detection/docker in all pipelines
- Enable telemetry metrics
- Remove top-level volumes from docker-compose
- Mount docker socket and add docker group
- Drop unused depends_on entries
- Fix cert script to chown ssl dir with sudo -R
2026-08-01 11:11:26 +00:00

79 lines
2.0 KiB
YAML

# config/otel-collector.yaml
# Collector configuration routing to the LGTM stack
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
tls:
ca_file: /etc/otelcol-contrib/ssl/ca.crt
cert_file: /etc/otelcol-contrib/ssl/server.crt
key_file: /etc/otelcol-contrib/ssl/server.key
http:
endpoint: 0.0.0.0:4318
tls:
ca_file: /etc/otelcol-contrib/ssl/ca.crt
cert_file: /etc/otelcol-contrib/ssl/server.crt
key_file: /etc/otelcol-contrib/ssl/server.key
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 5s
static_configs:
- targets: ['127.0.0.1:8888']
- job_name: 'gitea'
scrape_interval: 5s
static_configs:
- targets: ['gitea_server:3000']
# - job_name: 'matrix'
# scrape_interval: 5s
# static_configs:
# - targets: ['matrix-synapse:8888']
# - job_name: 'caddy'
# scrape_interval: 5s
# static_configs:
# - targets: ['caddy-proxy:8888']
processors:
# Batch processor for efficient data transfer
batch:
timeout: 5s
send_batch_size: 512
resource_detection/docker:
detectors: [env, docker]
timeout: 2s
override: false
exporters:
otlp_grpc:
endpoint: shion.stuyckv.local:4317
tls:
ca_file: /etc/otelcol-contrib/ssl/ca.crt
cert_file: /etc/otelcol-contrib/ssl/client.crt
key_file: /etc/otelcol-contrib/ssl/client.key
debug:
verbosity: basic
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch, resource_detection/docker]
exporters: [otlp_grpc]
metrics:
receivers: [otlp]
processors: [batch, resource_detection/docker]
exporters: [otlp_grpc, debug]
logs:
receivers: [otlp]
processors: [batch, resource_detection/docker]
exporters: [otlp_grpc]
telemetry:
metrics: