Interview Prep/Monitoring & Observability/Logging: Loki, Fluent Bit and Elasticsearch

Alloy logs `error sending batch, will retry ... status=401 ... no org id`

BeginnerTroubleshootingLogging: Loki, Fluent Bit and Elasticsearch
Answer

Likely causes → Loki runs with auth_enabled: true and the agent sends no tenant ID.

Diagnose → Check the loki.write endpoint config for tenant_id.

Fix →

loki.write "default" {
  endpoint {
    url       = "http://loki-gateway/loki/api/v1/push"
    tenant_id = "prod"
  }
}

Prevent → Template tenant IDs per cluster.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: Loki, Fluent Bit and Elasticsearch