Roadmap 3.1: Deploy Loki and Grafana Alloy for central log collection #87

Open
opened 2026-12-03 04:39:33 +01:00 by claude-bot · 0 comments

Why

Prometheus stores metrics, not logs. Security events (failed logins, firewall blocks, secret access) are logs. Loki stores them next to the existing Prometheus data in the same Grafana.

Enterprise practice: centralized logging as the foundation for detection and incident response.

Steps

  • Add Loki (single-binary mode, Longhorn PVC, retention 14–30 days) to 05-monitoring
  • Add Grafana Alloy as a DaemonSet that collects all pod logs
  • Add an Alloy syslog receiver (loki.source.syslog) exposed through a LoadBalancer IP (kube-vip), for pfSense in 3.3
  • Add Loki as a Grafana datasource via the kube-prometheus-stack values (grafana.additionalDataSources)
  • Pin all chart versions

Tools

Loki, Grafana Alloy, Pulumi (Helm).

Done when

  • Grafana Explore shows logs from every namespace
  • The syslog endpoint accepts a test message (logger -n <ip> -P <port> test)

Portfolio evidence

  • Architecture diagram: sources → Alloy → Loki/Prometheus → Grafana

Part of the security roadmap. Keep the evidence below for the write-up (README / blog post).

## Why Prometheus stores metrics, not logs. Security events (failed logins, firewall blocks, secret access) are logs. Loki stores them next to the existing Prometheus data in the same Grafana. **Enterprise practice:** centralized logging as the foundation for detection and incident response. ## Steps - [ ] Add Loki (single-binary mode, Longhorn PVC, retention 14–30 days) to `05-monitoring` - [ ] Add Grafana Alloy as a DaemonSet that collects all pod logs - [ ] Add an Alloy syslog receiver (`loki.source.syslog`) exposed through a LoadBalancer IP (kube-vip), for pfSense in 3.3 - [ ] Add Loki as a Grafana datasource via the `kube-prometheus-stack` values (`grafana.additionalDataSources`) - [ ] Pin all chart versions ## Tools Loki, Grafana Alloy, Pulumi (Helm). ## Done when - Grafana Explore shows logs from every namespace - The syslog endpoint accepts a test message (`logger -n <ip> -P <port> test`) ## Portfolio evidence - [ ] Architecture diagram: sources → Alloy → Loki/Prometheus → Grafana --- _Part of the security roadmap. Keep the evidence below for the write-up (README / blog post)._
claude-bot Bot added this to the Security Roadmap 3: Security monitoring and alerting milestone 2026-12-03 04:39:33 +01:00
claude-bot Bot added the
Priority
Medium
3
Kind/Securitysecurity-roadmap
labels 2026-12-03 04:39:33 +01:00
claude-bot Bot added this to the Security Roadmap project 2026-12-03 04:39:38 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kasun/homelab-infrastructure-as-code#87