feat: add alloy

This commit is contained in:
Sean Robinson 2026-06-16 10:06:08 -04:00
parent 8f8827aba1
commit dbff6e4793
4 changed files with 185 additions and 0 deletions

70
docker/alloy/compose.yaml Normal file
View file

@ -0,0 +1,70 @@
name: alloy
services:
alloy:
image: grafana/alloy:${ALLOY_VERSION:-v1.17.0}
restart: unless-stopped
command:
- run
- --server.http.listen-addr=0.0.0.0:12345
- --storage.path=/var/lib/alloy/data
- /etc/alloy/config.alloy
environment:
OTEL_EXPORTER_OTLP_ENDPOINT: ${ALLOY_OTLP_FORWARD_ENDPOINT:-http://lgtm:4318}
# Log level: debug, info, warn, error
ALLOY_LOG_LEVEL: ${ALLOY_LOG_LEVEL:-info}
# UI basic auth (optional)
ALLOY_UI_USERNAME: ${ALLOY_UI_USERNAME:-admin}
ALLOY_UI_PASSWORD: ${ALLOY_UI_PASSWORD:-}
ports:
# Alloy UI / debug endpoint
- ${EXPOSE_ALLOY_UI_PORT:-12345}:12345
# OTLP gRPC receiver
- ${EXPOSE_OTLP_GRPC_PORT:-4317}:4317
# OTLP HTTP receiver
- ${EXPOSE_OTLP_HTTP_PORT:-4318}:4318
volumes:
# Pipeline configuration
- ./config.alloy:/etc/alloy/config.alloy:ro
# Persistent storage for component state
- ./alloy-data:/var/lib/alloy/data
healthcheck:
test:
- CMD
- wget
- --no-verbose
- --tries=1
- --spider
- http://localhost:12345/-/healthy
interval: 15s
timeout: 5s
retries: 10
start_period: 10s
networks:
alloy:
pipeline:
aliases:
- alloy
- otel
# swag:
# aliases:
# - alloy
networks:
alloy:
name: alloy
driver: bridge
pipeline:
name: pipeline
external: true
# swag:
# name: swag
# external: true
volumes: {}