Skip to content

Commit cb4ff7f

Browse files
committed
articles
1 parent 53e5f83 commit cb4ff7f

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

docs/home-lab/articles/ai-log-summary.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# AI Log Summary: Turning Noise into Insights
22

33
**Project Status:** ✅ Operational
4-
**Components:** Grafana Loki, Google Gemini 2.0 Flash, Home Assistant, Unraid, Python
4+
**Components:** Grafana, Loki, Promtail, Otel-Collector, Google Gemini 2.0 Flash, Home Assistant, Unraid, Python
55

66
### 1. The Problem: Log Fatigue
77
In a distributed homelab (Unraid, Proxmox VE, Edge Servers, DNS (Adguard + Unbound), Traefik, Unifi Network, Tailscale ...), logs are scattered everywhere.
@@ -30,47 +30,47 @@ Instead of feeding raw logs to an LLM (which is slow and expensive), I implement
3030

3131

3232
### 3. Architecture Diagram
33-
3433
```mermaid
3534
graph TD
36-
%% --- LEVEL 1: EDGE ---
37-
subgraph Edge ["Edge Nodes (Collectors)"]
35+
%% --- LEVEL 1: SOURCES ---
36+
subgraph Sources ["Distributed Sources"]
3837
direction TB
39-
Docker[Docker Logs] & System[System Logs] --> Promtail[Promtail Agent]
38+
Edge[Edge Nodes] -->|Promtail| Loki
39+
Unifi[Unifi UDM Pro] -->|Syslog 5514| Otel
40+
PVE[Proxmox Nodes] -->|Syslog 5514| Otel
41+
UnraidD[Unraid Docker] -->|Filelog| Otel
4042
end
4143
42-
%% --- LEVEL 2: UNRAID ---
43-
subgraph Unraid ["Unraid Server (The Brain)"]
44+
%% --- LEVEL 2: PROCESSING ---
45+
subgraph Hub ["Unraid Hub (Processing)"]
4446
direction TB
45-
Promtail -->|Push| Loki[Loki DB]
47+
Otel[Otel Collector] -->|OTLP Push| Loki[Loki DB]
4648
47-
%% The Fork: Human vs AI
48-
Loki -->|Visualise| Grafana[Grafana UI]
4949
Loki -->|Fetch| Script[Python Script]
50-
50+
Loki -->|Visualise| Grafana[Grafana UI]
5151
Script <-->|Analyze| Gemini[Gemini API]
5252
end
5353
54-
%% --- LEVEL 3: HA ---
55-
subgraph HA ["Home Assistant (Interface)"]
54+
%% --- LEVEL 3: INTERFACE ---
55+
subgraph HA ["Home Assistant"]
5656
direction TB
5757
Script -->|Webhook| Core[Home Assistant]
5858
Core --> Phone[Mobile Alert]
5959
Core --> Wall[Dashboard]
6060
end
6161
62-
%% --- THE FIX: INVISIBLE STRUT ---
62+
%% --- THE FIX: INVISIBLE STRUT ---
6363
%% Forces HA to stay at the bottom
6464
Gemini ~~~ Core
6565
66-
%% --- STYLING ---
66+
style Otel fill:#ff9900,stroke:#333,stroke-width:2px,color:white
6767
style Loki fill:#f9f,stroke:#333,stroke-width:2px
6868
style Script fill:#ff9,stroke:#333,stroke-width:2px
69-
style Gemini fill:#4285f4,stroke:#fff,stroke-width:2px,color:#fff
70-
style Grafana fill:#ff9900,stroke:#333,stroke-width:2px,color:white
7169
```
7270

73-
*Logs are aggregated from distributed collectors via Promtail and centralized in a Loki instance on Unraid. This data feeds two parallel consumers: Grafana for visualization and a Python-based automation loop. The Python script queries Loki, processes logs through Google Gemini for anomaly detection, and forwards actionable insights to Home Assistant via Webhooks.*
71+
72+
73+
*Logs are aggregated from distributed collectors via Promtail and Otel-Collector and centralized in a Loki instance on Unraid. This data feeds two parallel consumers: Grafana for visualization and a Python-based automation loop. The Python script queries Loki, processes logs through Google Gemini for anomaly detection, and forwards actionable insights to Home Assistant via Webhooks.*
7474

7575

7676
### 4. Key Features

0 commit comments

Comments
 (0)