Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/observability/alloy/config.alloy
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,12 @@ loki.process "filter_old" {
loki.write "local" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
// Default batch_wait is 1s, but indexing jobs frequently emit
// only 3 progress lines (started / file-visited / finished)
// for incremental updates, which doesn't always trip Alloy's
// flush trigger in time. Tighter batch_wait keeps low-volume
// flushes responsive — at the cost of slightly more HTTP
// traffic to Loki, which is fine for local dev.
batch_wait = "500ms"
}
}
13 changes: 13 additions & 0 deletions packages/observability/loki/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ schema_config:
prefix: index_
period: 24h

# Loki 3.x reads the chunks-store path from `storage_config.filesystem.directory`.
# When unset, the chunks flusher falls back to a relative `mkdir <tenant>`
# against Loki's CWD (`/`), which the `loki` user cannot write — producing
# "mkdir fake: permission denied" errors (the default tenant id is `fake`,
# not a permission name). The flush failures cascade: chunks pile in memory
# → ingester ring marks itself unhealthy → Alloy's writes get back 500
# "empty ring" and silently stall ingest. Verified via the `/config`
# endpoint that this is the field the chunks flusher actually reads;
# `common.storage.filesystem.chunks_directory` does NOT propagate here.
storage_config:
filesystem:
directory: /loki/chunks

limits_config:
# Accept Docker logs of any age — local containers may have months of
# backlog when they're first picked up by Alloy.
Expand Down
Loading