45 lines
1.9 KiB
Text
45 lines
1.9 KiB
Text
// =============================================================================
|
|
// 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
|
|
}
|