Lion Cipher Lab

Set up centralized logging with Loki and Grafana

Why it matters

Centralizing logs is the foundation of every investigation, but the Elastic Stack asks for a lot of RAM and disk before you have learned anything. Grafana Loki is the lean alternative a huge number of home labs and small SOCs actually run: it indexes only labels and stores the raw lines compressed, so you can keep far more log history on modest hardware. Learning to ship logs with an agent, query them with LogQL, and build a dashboard — for free, on your own box — gives you the same collect-store-query-visualize muscle a SOC analyst uses every shift, at a size you can run at home. It also…

What you'll learn

Steps in this lab

  1. What centralized logging is, and what Loki is
  2. The tradeoff: labels, not full text
  3. Stand it up with Docker Compose
  4. Ship logs with Promtail
  5. Connect Grafana to Loki
  6. Query with LogQL: label selectors and filters
  7. Turn logs into metrics: rate and count
  8. Build a panel and a dashboard, and where this fits

Open the full interactive lab →