Monitoring a two-server home setup: Prometheus, Loki, Grafana Alloy and Telegram alerts
A good hands-on write-up on Habr: how to build a single system for monitoring, log collection and alerting across a home infrastructure of several servers.
The author's starting layout: a VPS (Edge) handles networking, DNS filtering, monitoring and supporting services, while the home server (Workload) runs the applications, databases and personal files. The two nodes are linked over a private network.
A familiar problem: once you have several servers and lots of containers, SSHing in and reading logs by hand is awkward and unreliable, and short outages are easy to miss.
What the solution is built from:
- Prometheus — collects metrics and evaluates alerting rules
- Node Exporter — OS metrics, cAdvisor — Docker container metrics
- Blackbox Exporter — HTTP(S) availability and TLS certificate expiry
- Grafana Alloy — discovers containers and ships their logs to Loki
- Loki — centralized log storage, Grafana — the interface
- Alertmanager — groups notifications and sends them to Telegram
- plus Nginx and AdGuard Home exporters and wg-easy metrics
The core (Prometheus, Grafana, Loki, Alertmanager, Blackbox) lives on the VPS, and the home server keeps only Node Exporter, cAdvisor, Nginx Exporter and Alloy. I like this idea: if the home server goes down, you hear about it from an outside machine instead of after the fact.
The article walks through the Prometheus and Alloy configs, the alert rules and notification delivery in detail — a handy base for your own homelab.
Source: Хабр
The author's starting layout: a VPS (Edge) handles networking, DNS filtering, monitoring and supporting services, while the home server (Workload) runs the applications, databases and personal files. The two nodes are linked over a private network.
A familiar problem: once you have several servers and lots of containers, SSHing in and reading logs by hand is awkward and unreliable, and short outages are easy to miss.
What the solution is built from:
- Prometheus — collects metrics and evaluates alerting rules
- Node Exporter — OS metrics, cAdvisor — Docker container metrics
- Blackbox Exporter — HTTP(S) availability and TLS certificate expiry
- Grafana Alloy — discovers containers and ships their logs to Loki
- Loki — centralized log storage, Grafana — the interface
- Alertmanager — groups notifications and sends them to Telegram
- plus Nginx and AdGuard Home exporters and wg-easy metrics
The core (Prometheus, Grafana, Loki, Alertmanager, Blackbox) lives on the VPS, and the home server keeps only Node Exporter, cAdvisor, Nginx Exporter and Alloy. I like this idea: if the home server goes down, you hear about it from an outside machine instead of after the fact.
The article walks through the Prometheus and Alloy configs, the alert rules and notification delivery in detail — a handy base for your own homelab.
Source: Хабр

Comments 0
Leave the first comment, in any language.
Log in to comment