infra: full IaC state after hf-pdocker-01 rebuild (2026-03-08)

Replaces initial Nomad/Consul/Terraform skeleton with current Docker-based
infrastructure across all three nodes (hf-pdocker-01, hf-pdocker-02, bart).

Key changes:
- CLAUDE.md: updated service distribution reflecting hf-pdocker-01 restored
- docs/plans/2026-03-08-hf-pdocker-01-rebuild.md: new rebuild plan doc
- compose/bart/: ai-agents, guacamole, matrix, media, openvas, smarthome, watchtower
- compose/hf-pdocker-02/: traefik, monitoring, adguard, gitea, semaphore, wikijs,
  unifi, vaultwarden, actual-budget, mcpo, netclaw, trivy, watchtower, n8n
- compose/hf-pdocker-01/: frigate, frigate-notify, farm-agent
- stacks/: all Swarm stack definitions (monitoring, traefik, smarthome, matrix,
  guacamole, media, ai-agents, frigate, gitea, semaphore, wikijs, unifi, etc.)
- .gitignore: exclude .env credential files and acme.json certs
- .env.example: placeholder credential files for all services
- .claude/agents/: gitea-backup and other infrastructure agent configs
- scripts/: frigate media cleanup and NAS sync scripts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 18:51:25 -05:00
parent b1d111a011
commit de1d9e1d93
102 changed files with 12634 additions and 3 deletions
+163
View File
@@ -0,0 +1,163 @@
global:
scrape_interval: 1m
evaluation_interval: 1m
alerting:
alertmanagers:
- static_configs:
- targets:
- 'alertmanager:9093'
rule_files:
- "alerts.yml"
scrape_configs:
# Prometheus self-monitoring
- job_name: 'prometheus'
scrape_interval: 1m
static_configs:
- targets: ['localhost:9090']
# Node Exporter (system metrics) - all 3 swarm nodes
- job_name: 'node'
static_configs:
- targets: ['192.168.86.192:9100']
labels:
hostname: 'hf-pdocker-01'
host_ip: '192.168.86.192'
- targets: ['192.168.86.167:9100']
labels:
hostname: 'bart'
host_ip: '192.168.86.167'
- targets: ['192.168.86.100:9100']
labels:
hostname: 'hf-pdocker-02'
host_ip: '192.168.86.100'
# Blackbox Exporter self-monitoring
- job_name: 'blackbox'
static_configs:
- targets: ['blackbox-exporter:9115']
# Matrix Alertmanager Receiver metrics (running on hf-pdocker-02 during failover)
- job_name: 'matrix-alertmanager-receiver'
scrape_interval: 1m
static_configs:
- targets: ['192.168.86.100:9094']
labels:
hostname: 'hf-pdocker-02'
# HTTP Health Checks - hf-pdocker-01 services (native services only; failover services tracked in other jobs)
- job_name: 'http-pdocker01'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- http://192.168.86.192:5000 # Frigate NVR (standalone, host network)
- http://192.168.86.192:5199/health # Frigate Notify
- http://192.168.86.192:8888/health # Farm Manager API
- http://192.168.86.192:8889/health # Farm Agent
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# HTTP Health Checks - hf-pdocker-02 services (native + failover from hf-pdocker-01)
- job_name: 'http-pdocker02'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- http://192.168.86.100:3003 # Gitea
- http://192.168.86.100:3004 # Semaphore
- http://192.168.86.100:3002 # Wiki.js
- http://192.168.86.100:26226 # Vaultwarden
- http://192.168.86.100:5006 # Actual Budget
- http://192.168.86.100:8001/openapi.json # MCPO
- http://192.168.86.100:8889/health # Farm Agent
- http://192.168.86.100:3001 # Grafana (FAILOVER from hf-pdocker-01)
- http://192.168.86.100:9095 # Prometheus (FAILOVER from hf-pdocker-01)
- http://192.168.86.100:9093 # Alertmanager (FAILOVER from hf-pdocker-01)
- http://192.168.86.100:3000 # AdGuard Home (FAILOVER from hf-pdocker-01)
- http://192.168.86.100:9000 # Portainer
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# HTTPS Health Checks - services with self-signed certs
- job_name: 'http-pdocker02-https'
metrics_path: /probe
params:
module: [http_2xx_insecure]
static_configs:
- targets:
- https://192.168.86.100:8443 # Unifi Controller (self-signed cert)
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# HTTP Health Checks - bart services (native + failover from hf-pdocker-01)
- job_name: 'http-bart'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- http://192.168.86.167:8096 # Jellyfin
- http://192.168.86.167:8989 # Sonarr
- http://192.168.86.167:7878 # Radarr
- http://192.168.86.167:8082 # SABnzbd
- http://192.168.86.167:5076 # NZBHydra2
- http://192.168.86.167:5055 # Jellyseerr
- http://192.168.86.167:9392 # OpenVAS
- http://192.168.86.167:8889/health # Farm Agent
- http://192.168.86.167:8123 # Home Assistant (FAILOVER from hf-pdocker-01)
- http://192.168.86.167:6052 # ESPHome (FAILOVER from hf-pdocker-01)
- http://192.168.86.167:8199/guacamole/ # Guacamole (FAILOVER from hf-pdocker-01)
- http://192.168.86.167:8008 # Matrix Synapse (FAILOVER from hf-pdocker-01)
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# HTTPS Health Checks - External domains via Traefik
- job_name: 'http-external'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- https://mess.hobbs.farm # Matrix (via Traefik)
- https://solo.hobbs.farm/guacamole/ # Guacamole (via Traefik)
- https://yoda.hobbs.farm # Home Assistant
- https://vault.hobbs.farm # Vaultwarden
- https://git.hobbs.farm # Gitea
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# Unifi Network Devices - uncomment when unifi-exporter is deployed
# - job_name: 'unifi-devices'
# scrape_interval: 30s
# static_configs:
# - targets: ['unifi-exporter:9101']