observability configs: loki delete_request_store, prometheus targets, grafana root URL
- loki: recent releases require compactor.delete_request_store when retention is enabled (was crash-looping on start) - prometheus: scrape targets carried legacy dankclaw.local names with URL schemes (invalid); point at published LAN ports and the gitea quadlet's published port instead - grafana: GF_SERVER_ROOT_URL to the canonical HTTPS name - tests: 3 new seams for the deployed observability configs
This commit is contained in:
1 parent
d5e9c63802
commit
37f05a5f9e
4 files changed
+27
-8
No files matched your search
@@ -124,7 +124,7 @@ services:
|
|||||||
container_name: grafana
|
container_name: grafana
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
GF_SERVER_ROOT_URL: "http://grafana.dankclaw.local"
|
GF_SERVER_ROOT_URL: "https://grafana.franksdank.cloud"
|
||||||
GF_SECURITY_ADMIN_USER: "${GRAFANA_ADMIN_USER}"
|
GF_SECURITY_ADMIN_USER: "${GRAFANA_ADMIN_USER}"
|
||||||
GF_SECURITY_ADMIN_PASSWORD: "${GRAFANA_ADMIN_PASSWORD}"
|
GF_SECURITY_ADMIN_PASSWORD: "${GRAFANA_ADMIN_PASSWORD}"
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ compactor:
|
|||||||
retention_enabled: true
|
retention_enabled: true
|
||||||
retention_delete_delay: 2m
|
retention_delete_delay: 2m
|
||||||
retention_delete_worker_count: 1
|
retention_delete_worker_count: 1
|
||||||
|
# Required by recent Loki when retention is enabled.
|
||||||
|
delete_request_store: filesystem
|
||||||
|
|
||||||
ruler:
|
ruler:
|
||||||
storage:
|
storage:
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ scrape_configs:
|
|||||||
static_configs:
|
static_configs:
|
||||||
- targets: ["192.168.0.235:9100"]
|
- targets: ["192.168.0.235:9100"]
|
||||||
|
|
||||||
# Gitea metrics
|
# Gitea metrics (quadlet on an isolated network; use the published LAN port)
|
||||||
- job_name: "gitea"
|
- job_name: "gitea"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ["gitea:3000"]
|
- targets: ["192.168.0.143:3000"]
|
||||||
metrics_path: "/metrics"
|
metrics_path: "/metrics"
|
||||||
|
|
||||||
# Grafana metrics
|
# Grafana metrics
|
||||||
@@ -45,12 +45,11 @@ scrape_configs:
|
|||||||
static_configs:
|
static_configs:
|
||||||
- targets: ["comfyui:8188"]
|
- targets: ["comfyui:8188"]
|
||||||
|
|
||||||
# Blackbox-style probes for service up/down
|
# Blackbox-style probes for service up/down (published LAN ports;
|
||||||
|
# gitea and comfyui are covered by their own jobs above)
|
||||||
- job_name: "services"
|
- job_name: "services"
|
||||||
metrics_path: "/"
|
metrics_path: "/"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
- "http://search.dankclaw.local"
|
- "192.168.0.143:8081" # SearXNG (via the Gluetun tunnel)
|
||||||
- "http://chat.dankclaw.local"
|
- "192.168.0.143:3005" # OpenWebUI
|
||||||
- "http://gitea.dankclaw.local"
|
|
||||||
- "http://comfyui.dankclaw.local"
|
|
||||||
@@ -100,3 +100,21 @@ CADDYFILE="$REPO_ROOT/dankclaw/Caddyfile"
|
|||||||
grep -q 'xcaddy build' "$cf"
|
grep -q 'xcaddy build' "$cf"
|
||||||
grep -q 'github.com/caddy-dns/porkbun' "$cf"
|
grep -q 'github.com/caddy-dns/porkbun' "$cf"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# --- Observability configs (deployed by deploy.sh step 3) ---
|
||||||
|
|
||||||
|
@test "no legacy .local service names remain in shared configs or compose" {
|
||||||
|
! grep -rn 'dankclaw\.local\|dankserver\.local' \
|
||||||
|
"$REPO_ROOT/shared" "$REPO_ROOT/dankclaw/compose.yaml"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "loki compactor has a delete_request_store (required when retention is on)" {
|
||||||
|
local loki="$REPO_ROOT/shared/loki/loki-config.yaml"
|
||||||
|
if grep -q 'retention_enabled: true' "$loki"; then
|
||||||
|
grep -q 'delete_request_store:' "$loki"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "prometheus targets are host:port (no URL schemes)" {
|
||||||
|
! grep -nE '^\s*-\s*"?http' "$REPO_ROOT/shared/prometheus/prometheus.yml"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user