Files
serverAppConfigs/serverAppConfigs-docs/Infrastructure/Loki.md
T
Frank 5829a0bfe8 docs: rename docs/ -> serverAppConfigs-docs/ per system-wide PROJECTNAME-docs convention
All in-repo path references (AGENTS.md, README, old scripts, report artifacts,
test code paths) rewritten in the same commit; focused-test map extended for
.gitignore, old/scripts/*, dankclaw/comfyui/*, and report/* per this repo's
own convention ('add one before committing'). Obsidian wikilinks are
title-based and unaffected.
2026-08-28 02:20:06 -07:00

1.6 KiB

Loki

Loki is the log aggregation backend of the observability stack. It stores and queries container and system logs, and it feeds the log panels in Grafana. It replaces the need for a full ELK stack.

Host: Dankclaw — Docs: https://grafana.com/docs/loki/latest

Facts (from research)

Item Value
Image franksdank/loki:latest (local build with a static busybox healthcheck)
Port 3100 (host) → 3100 (container)
Mode single-binary (all components in one process)
Storage filesystem (bind mount)
Auth auth_enabled: false (single-tenant homelab)
Schema v13 / TSDB

Configuration

Config lives at shared/loki/loki-config.yaml. Key settings:

  • schema_config v13 with store: tsdb and filesystem object store.
  • compactor with retention_enabled: true so logs do not grow without bound.
  • replication_factor: 1 for a single instance.

Volumes

Container path Host path (convention)
/loki /opt/loki/data
/etc/loki/loki-config.yaml shared/loki/loki-config.yaml (bind mount)

Healthcheck

Loki responds on /ready with 200.

Log Shipping

The Alloy agent on each host ships container and journal logs to Loki. Grafana queries Loki through the datasource in Observability.

Gotchas

  • Filesystem storage grows; enable compactor retention.
  • Loki and Promtail/Alloy must agree on the push URL: http://loki:3100/loki/api/v1/push.
  • For multi-host shipping, Loki's HTTP listener binds 0.0.0.0.

See Also