domino_admin_toolkit.checks.test_prometheus_health module
- domino_admin_toolkit.checks.test_prometheus_health.prometheus_health_data(k8s_client, platform_namespace)
Collect Prometheus server and adapter health without querying Prometheus.
- Return type:
- domino_admin_toolkit.checks.test_prometheus_health.test_prometheus_health(prometheus_health_data, runner)
- Description:
Reports on Prometheus itself, so a report whose Prometheus-backed checks came back empty or skipped says why. Covers the prometheus-server StatefulSet and, where it is still deployed, prometheus-adapter. Reads Kubernetes object status and the kubelet Summary API only — no PromQL — so it keeps working while Prometheus is down.
- Failure Conditions:
prometheus-server (or prometheus-adapter) has no pods, was evicted, or is not Ready (a pod still within its 10 minute startup grace is WARN while its container is created or it loads data from disk; a container that already crashed gets no grace)
Last termination was OOMKilled within 24h (another recent restart reason is WARN)
Memory: working set at 90%+ of the container limit; with no limit (the Prometheus default) 25%+ of node allocatable, or under 10% of the node’s memory available
TSDB volume at 85%+ of capacity
ERROR when the workloads, memory or volume cannot be read; every message names Prometheus
prometheus-adapter absent is PASS: it is not deployed on current Domino releases
- Troubleshooting Steps:
kubectl -n <platform-ns> get sts prometheus-server; kubectl -n <platform-ns> describe pod prometheus-server-0
Not Ready after a restart: check the events for liveness/readiness probe failures — loading data from disk at startup needs more memory than steady state
Memory: kubectl top pod prometheus-server-0 and kubectl describe node <node> (Allocated resources, MemoryPressure); find high-cardinality jobs with topk(10, count by (job)({job=~”.+”}))
Disk: compare the TSDB used/capacity figures in the table above with –storage.tsdb.retention.size (kubectl -n <platform-ns> exec prometheus-server-0 -c prometheus-server – df -h /data to confirm)
Adapter: kubectl -n <platform-ns> describe deploy prometheus-adapter; look for exit code 137
- Resolution Steps:
Workspaces page not loading while Prometheus is down: disable the KubernetesContainerMetricsEnabled feature flag so nucleus stops querying Prometheus, then fix Prometheus
Startup memory or corrupt data: scale sts/prometheus-server to 0, delete the PVC labelled app.kubernetes.io/name=prometheus, scale back to 1 (drops stored metrics)
Memory growth: drop high-cardinality labels or metrics in the scrape config, or move Prometheus to a larger platform node
prometheus-adapter OOMKilled: raise its memory limit (3Gi per the runbook) and restart the Deployment
See the Prometheus runbook (Troubleshooting and Known Issues)
Required Permissions: Platform admin access, kubectl access to the platform namespace and nodes
- See also:
test_prometheus.py::test_prometheus_ping — HTTP reachability of http://prometheus-server
test_k8s_platform_sizing.py — memory and OOM for every platform pod (PromQL, blind while Prometheus is down)
test_platform_pvcs.py — usage of every platform PVC, the Prometheus volume included (PromQL)
info/test_pvc_usage_rate.py — PVC growth rate, to forecast when the TSDB volume fills