fix: add Headscale monitoring, alerts, and pin UI image

- Add 4 Prometheus alerts: HeadscaleDown (critical), NoOnlineNodes,
  HighHTTPLatency, HighErrorRate
- Add Grafana dashboard with node count, map responses, HTTP latency,
  nodestore operations, and memory panels
- Pin headscale-ui to digest sha256:015f5ba0... (was :latest)
- Set disable_check_updates: true to skip GitHub check on startup
- Uptime Kuma monitor already existed (id=19, 300s interval)
This commit is contained in:
Viktor Barzin 2026-03-28 16:07:04 +02:00
parent 972edf4d30
commit 725fefe565
3 changed files with 124 additions and 1 deletions

View file

@ -175,7 +175,7 @@ resource "kubernetes_deployment" "headscale" {
# }
# }
container {
image = "ghcr.io/gurucomputing/headscale-ui:latest"
image = "ghcr.io/gurucomputing/headscale-ui@sha256:015f5ba04bcbd5ee03178540a1dbbfc97b6896d7411032e3bf33c2f3e08f8b6f"
# image = "ghcr.io/tale/headplane:0.3.2"
name = "headscale-ui"
@ -424,3 +424,17 @@ resource "kubernetes_cron_job_v1" "headscale_backup" {
}
}
}
# Grafana dashboard
resource "kubernetes_config_map" "grafana_headscale_dashboard" {
metadata {
name = "grafana-headscale-dashboard"
namespace = "monitoring"
labels = {
grafana_dashboard = "1"
}
}
data = {
"headscale.json" = file("${path.module}/dashboards/headscale.json")
}
}