Skip to content

๐Ÿ“Š Prometheus Monitoring Stack

Host: Homelab ยท Compose: Homelab/Docker/prometheus/compose.yaml
Stack name: prometheus


1. Overview

A comprehensive Prometheus-based monitoring stack with exporters for nearly every service in the homelab. Metrics are collected from AdGuard, UniFi, all *arr applications, qBittorrent, MQTT, PostgreSQL, UPS (NUT), and Immich, then visualised in Grafana.


2. Architecture & Services

Service Image Port Role
prometheus prom/prometheus:v3.12.0 9090 Core metrics storage and query engine
adguard_exporter_1โ€“5 ebrianne/adguard-exporter:v1.14 โ€” Metrics from 5 AdGuard instances
lidarr-exporter onedr0p/exportarr:v2.3 9709 Lidarr metrics
prowlarr-exporter onedr0p/exportarr:v2.3 9710 Prowlarr metrics
radarr-exporter onedr0p/exportarr:v2.3 9708 Radarr metrics
readarr-exporter onedr0p/exportarr:v2.3 9713 Readarr metrics
sonarr-exporter onedr0p/exportarr:v2.3 9707 Sonarr metrics
mqtt-exporter jryberg/mosquitto-exporter:v0.7.7 โ€” MQTT broker metrics
nut-exporter hon95/prometheus-nut-exporter:1.2.1 9995 UPS (NUT) metrics
postgres-exporter prometheuscommunity/postgres-exporter:v0.19.1 โ€” PostgreSQL metrics
qbittorrent-exporter caseyscarborough/qbittorrent-exporter:v1.3.5 โ€” qBittorrent metrics
unpoller unpoller/unpoller:v3.3.0 โ€” UniFi controller metrics
immich-exporter eithan1231/immich-exporter โ€” Immich photo library metrics

3. Networking

All exporters and Prometheus share the backend external network. Prometheus is also on apps for Grafana scraping. database network is used by the PostgreSQL exporter.


4. Persistent Storage

Container Host Path Description
prometheus /docker/data/prometheus/prometheus prometheus.yml config and TSDB data

5. Environment Variables

[!WARNING] Several exporters have credentials hardcoded in the compose file. These should be moved to .env before making the repo public.

Exporter Key Variables
adguard_exporter_* adguard_hostname, adguard_username, adguard_password
*arr-exporters URL (service address), APIKEY (*arr API key), PORT
qbittorrent-exporter QBITTORRENT_USERNAME, QBITTORRENT_PASSWORD, QBITTORRENT_BASE_URL
postgres-exporter DATA_SOURCE_URI, DATA_SOURCE_USER, DATA_SOURCE_PASS
unpoller UP_UNIFI_CONTROLLER_0_URL, UP_UNIFI_CONTROLLER_0_USER, UP_UNIFI_CONTROLLER_0_PASS
immich-exporter IMMICH_HOST, IMMICH_KEY

6. Access & Usage

URL Description
http://localhost:9090 Prometheus UI
https://grafana.m1ckyb.com Grafana dashboards (OAuth via Authentik)
# Start
docker compose -f Homelab/Docker/prometheus/compose.yaml up -d

# Reload config without restart
curl -X POST http://localhost:9090/-/reload

# Check all targets
curl http://localhost:9090/api/v1/targets | jq '.data.activeTargets[] | {job:.labels.job, health:.health}'

7. Maintenance & Backup

# Update
docker compose -f Homelab/Docker/prometheus/compose.yaml pull
docker compose -f Homelab/Docker/prometheus/compose.yaml up -d

# Backup Prometheus config (TSDB data is large โ€” consider remote_write instead)
rsync -av /docker/data/prometheus/ /backup/prometheus/