feat: add alloy
This commit is contained in:
parent
8f8827aba1
commit
dbff6e4793
4 changed files with 185 additions and 0 deletions
45
docker/alloy/config.alloy
Normal file
45
docker/alloy/config.alloy
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
// =============================================================================
|
||||
// Grafana Alloy Pipeline Configuration
|
||||
// Centralized OpenTelemetry collector for the curated compose stacks.
|
||||
// Receives OTLP traces/metrics/logs and forwards to the LGTM backend.
|
||||
// =============================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// OTLP Receiver — gRPC + HTTP
|
||||
// All stacks push telemetry here via OTLP gRPC (port 4317) or OTLP HTTP (port
|
||||
// 4318). Other stacks reference this service on the `pipeline` network as `otel`
|
||||
// or `alloy`.
|
||||
// ---------------------------------------------------------------------------
|
||||
otelcol.receiver.otlp "default" {
|
||||
grpc {
|
||||
endpoint = "0.0.0.0:4317"
|
||||
}
|
||||
http {
|
||||
endpoint = "0.0.0.0:4318"
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// OTLP Exporter — Forward to LGTM
|
||||
// Sends all received telemetry to the LGTM backend (grafana/otel-lgtm).
|
||||
// The target endpoint is configurable via the ALLOY_OTLP_FORWARD_ENDPOINT env
|
||||
// var, defaulting to http://lgtm:4318 (LGTM's OTLP HTTP endpoint on pipeline).
|
||||
// ---------------------------------------------------------------------------
|
||||
otelcol.exporter.otlp "lgtm" {
|
||||
client {
|
||||
endpoint = env("OTEL_EXPORTER_OTLP_ENDPOINT", "http://lgtm:4318")
|
||||
tls {
|
||||
insecure = true
|
||||
insecure_skip_verify = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Pipeline — Connect receiver to exporter(s)
|
||||
// Routes telemetry from the OTLP receiver to the LGTM exporter.
|
||||
// ---------------------------------------------------------------------------
|
||||
otelcol.pipeline "default" {
|
||||
receiver = otelcol.receiver.otlp.default
|
||||
exporter = otelcol.exporter.otlp.lgtm
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue