Home monitoring stack. Every service runs as a standalone Docker container managed by its own systemd unit — there is no Docker Compose involved:
- Prometheus (port 9090): metrics collection from multiple targets (homeassistant, cloud, AI services).
prometheus.service - Grafana (port 3000): admin password configurable (default: admin).
grafana.service - Blackbox Exporter (port 9115): HTTP and ICMP probes.
blackbox-exporter.service - Alertmanager (port 9093): alert routing and notifications.
alertmanager.service - Fluent Bit (host port 514, internal 5140): receives syslog and forwards to Loki.
fluent-bit.service - Loki (port 3100): log aggregation and storage.
loki.service
All critical parameters are chosen via a Kconfig-driven menu (make menuconfig) and written to .config:
- DATA_DIR: Directory for persistent volumes (default: repo directory)
- SYSTEM_USER: System username all containers run as (default:
monitoring); PUID/PGID are resolved from this user, not prompted directly - DNS_SERVERS: DNS server(s), comma-separated (default:
1.1.1.1) - GRAFANA_PASSWORD: Grafana admin password (default:
admin) - Service ports: Prometheus (9090), Grafana (3000), Blackbox Exporter (9115), Alertmanager (9093), Loki (3100), Fluent Bit (514)
BASE_DIR is not prompted — it's set automatically from the repo's location.
Important: .config is then translated by sudo make config into /etc/monitoring/monitoring.conf with permissions 600 — readable only by the system user to protect sensitive information.
Two steps, run in order:
make menuconfig— as your normal user. Opens a curses menu to choose parameters and writes.config. Requirespython-kconfiglib(sudo pacman -S python-kconfiglib).sudo make install— as root. Translates.configinto/etc/monitoring/monitoring.conf(permissions 600, owned by the configured system user), creates the externalmonitoring_networkDocker network, createsprometheus.service,grafana.service,fluent-bit.service,loki.service,alertmanager.service, andblackbox-exporter.servicesystemd units, and creates Prometheus rules directory, Grafana configs, Alertmanager configs, and data directories with correct ownership. Does not enable or start any service automatically.
Next steps after installation:
- Start everything:
sudo make start-all(orsudo systemctl enable --now <unit>...per unit for boot-persistent enablement) - View logs:
sudo journalctl -u <unit>.service -fper container
- Scrapes: homeassistant.home:8123 (
/api/prometheus), telegraf.cloud.home:9292 (/metrics), ai.home:9100, ai.home:5000 - An
ai-llamajob for llama.cpp metrics atmodel.cloud.homeexists but is currently commented out - Intervals: 60s (general), 30s (AI targets and blackbox probes)
- Routes alerts to alertmanager:9093
- Reads rules from
/etc/prometheus/rules/*.yml
- Routes alerts via
ntfy.shwebhooks:kdehairy_uptime_alertfor general alertskdehairy_home_monitorsfor Grafana-originated alerts
- Within each topic, the
severitylabel picks the ntfy priority:critical→ urgent,warning→ high,info→ low, anything else → ntfy's default - Alert grouping: 30s wait, 5m interval, 4h repeat
- Sends resolved alerts
- HTTP probes for: homeassistant.home:8123, darwish.cloud.home/health, music.home/api/v1/ping
- ICMP probes for: 192.168.50.1
All Nginx site configs must be symlinked to /etc/nginx/sites-enabled/ on the host for nginx to load them
- Sites with
listen 443 ssl(homeassistant.conf,openwebui.conf) share SSL/HTTP2 settings vianginx/snippets/ssl-params.conf, which must also be symlinked to/etc/nginx/snippets/ssl-params.confon the host
All services bind mount ${BASE_DIR}/${DATA_DIR} directories directly into their docker run invocation (no Compose volumes):
prometheus/etc/prometheus/→ container/etc/prometheusprometheus/prometheus/→ container/prometheus(TSDB)grafana/var/lib/grafana/→ container/var/lib/grafanagrafana/etc/grafana/→ container/etc/grafanablackbox-exporter/config/→ container/configalertmanager/config/→ container/etc/alertmanageralertmanager/(data dir) → container/alertmanagerfluent-bit/etc/fluent-bit/→ container/etc/fluent-bitfluent-bit/(data dir) → container/var/log/fluent-bitloki/etc/loki/→ container/etc/lokiloki/chunks(data dir) → container/etc/loki/chunksloki/rules(data dir) → container/etc/loki/rules
monitoring_network is an externally-managed Docker network (created by sudo make network/install), shared by all six standalone containers so they can resolve each other by container name: Prometheus and Loki reach alertmanager; Prometheus reaches blackbox-exporter; Grafana and Fluent Bit reach loki.
Services also resolve via .local and .cloud.home FQDNs on the host's DNS:
homeassistant.home:8123(Prometheus, Home Assistant)telegraf.cloud.home:9292(Telegraf)ai.home:9100(Node exporter)ai.home:5000(AMD GPU exporter)grafana.cloud.home(via Nginx)prometheus.cloud.home(via Nginx)192.168.50.0/24LAN for ICMP probes (Blackbox Exporter)
Host firewall managed by nftables.conf:
- Default input policy: drop
- LAN (
192.168.50.0/24): SSH (22), HTTP (80), internal ports (8181, 9292) - HTTPS (443): open to all
- Docker bridge forwarding explicitly permitted
- Apply firewall rules:
sudo nft -f nftables.conf
# Start/stop everything at once
sudo make start-all
sudo make stop-all
# Per-unit systemd control
sudo systemctl enable --now prometheus.service
sudo systemctl status prometheus.service
sudo journalctl -u prometheus.service -fControl via systemd unit files or Makefile:
- Config:
sudo make config- creates/etc/monitoring/monitoring.conf(600 permissions) - Network:
sudo make network- creates the externalmonitoring_networkDocker network - Service file:
sudo make service- renders and installs all six systemd units - Firewall:
sudo nft -f nftables.conf- applies firewall rules (requires network interface input) - Start/stop everything:
sudo make start-all/sudo make stop-all - Per-service install/uninstall:
make install-<name>/make uninstall-<name>forprometheus,grafana,fluent-bit,loki,alertmanager,blackbox-exporter - Operations: use
systemctl/journalctldirectly on individual units