diff --git a/manual/latex/images/discord-disk-alert-firing-2026-10-28.png b/manual/latex/images/discord-disk-alert-firing-2026-10-28.png new file mode 100644 index 0000000..f76bb72 Binary files /dev/null and b/manual/latex/images/discord-disk-alert-firing-2026-10-28.png differ diff --git a/manual/latex/images/discord-disk-alert-resolved-2026-10-28.png b/manual/latex/images/discord-disk-alert-resolved-2026-10-28.png new file mode 100644 index 0000000..189ea16 Binary files /dev/null and b/manual/latex/images/discord-disk-alert-resolved-2026-10-28.png differ diff --git a/manual/latex/images/discord-jenkins-down-firing-2026-10-28.png b/manual/latex/images/discord-jenkins-down-firing-2026-10-28.png new file mode 100644 index 0000000..2cb61eb Binary files /dev/null and b/manual/latex/images/discord-jenkins-down-firing-2026-10-28.png differ diff --git a/manual/latex/images/discord-jenkins-down-resolved-2026-10-28.png b/manual/latex/images/discord-jenkins-down-resolved-2026-10-28.png new file mode 100644 index 0000000..a3b448f Binary files /dev/null and b/manual/latex/images/discord-jenkins-down-resolved-2026-10-28.png differ diff --git a/manual/latex/images/grafana-build-window-2026-10-28.png b/manual/latex/images/grafana-build-window-2026-10-28.png new file mode 100644 index 0000000..79bd121 Binary files /dev/null and b/manual/latex/images/grafana-build-window-2026-10-28.png differ diff --git a/monitoring/EVIDENCE.md b/monitoring/EVIDENCE.md index 1dc8baf..08f0f74 100644 --- a/monitoring/EVIDENCE.md +++ b/monitoring/EVIDENCE.md @@ -74,3 +74,47 @@ undo: systemctl unmask multipathd fwupd udisks2 ModemManager && systemctl enable - Contact point is provisioned, so the UI offers no Test button. Legacy POST /api/alertmanager/grafana/config/api/v1/receivers/test -> 410 Gone ("use /apis/notifications.alerting.grafana.app/v1beta1/namespaces/{namespace}/receivers/{uid}/test"). - One failed admin auth at ~15:04 UTC from the droplet host (password read from file included compose-trimmed whitespace); later calls used the container's environment. - 15:05:55 UTC: POST .../receivers/dGVhbS1hbGVydHM/test with integration team-alerts-discord, secureFields.url=true -> {"status":"success","duration":"866ms"}. + +## Normal Jenkins build vs host metrics 2026-10-28 (UTC; EDT = UTC-4) + +- Before (15:10:40): cpu 48.6% (2m rate, during a periodic burst), MemAvailable 169.3 MiB, swap used 651.4 MiB; jenkins 348.3 MiB, 0.15% CPU. +- Commit d3a5e6b pushed by Billy; Gitea statuses on d3a5e6b: pending 15:17:36, pending 15:17:51, success 15:17:53 (vpn-dns-gateway/pipeline/head). +- Jenkins vpn-dns-gateway ยป feature/issue-19-monitoring #1: queued 15:17:33.9, started 15:17:41.3, duration 11.825 s, finished ~15:17:53.1, SUCCESS, "Ran 2 tests ... OK". Executed on the controller (built-in node; workspace /var/jenkins_home/workspace/eway_feature_issue-19-monitoring), single executor, no agents. +- Prometheus 30 s samples 15:12:00-15:22:00 (cpu = 100*(1-avg(rate(idle[1m]))), MiB, MiB, load1): + 15:12:00 38.5/186/652/0.79, 15:13:00 48.8/205/710/0.41, 15:14:00 8.3/224/708/0.15, 15:15:00 38.8/136/673/0.38, 15:16:00 15.0/169/695/0.14, 15:16:30 8.3/175/688/0.15, 15:17:00 39.4/104/650/0.29, **15:17:30 19.0/116/675/0.33, 15:18:00 32.1/196/691/0.41 (build window)**, 15:18:30 43.7/221/680/0.31, 15:19:00 46.4/133/652/0.84, 15:20:00 17.1/221/702/0.51, 15:21:00 35.7/114/651/0.47, 15:22:00 11.2/209/691/0.21. +- Result: no change attributable to the 11.8 s build; it is shorter than the 30 s scrape interval and its samples fall inside the background range (8-49%). Whole-host measurements cannot attribute CPU/RAM to Jenkins. +- Background pattern: bursts about every 2 min (CPU 35-49%, MemAvailable -80..-120 MiB). docker stats 15:23:39-15:25:47 every ~8 s: containers mostly <2% CPU; burst at 15:24:38-15:24:46 = gitea 13.7% CPU, 23->93 MiB, grafana 15.4%, 73->140 MiB, MemAvailable 118 MiB. +- CPU by mode, 15 min to ~15:26: idle 74.3%, iowait 14.7%, system 4.5%, user 4.0%, steal 1.6%. vmstat burst: si 2189 pages/s, wa 10%. Interpretation: memory pressure causes swap-in I/O wait; CPU work itself is ~8.5%. +- Dashboard v2 (15:26): CPU panel adds "of which I/O wait" = 100*avg(rate(node_cpu_seconds_total{mode="iowait"}[2m])). + +## Capacity alert test (Root disk space low) 2026-10-28 (UTC; EDT = UTC-4) + +- Before: rule inactive, instance Normal since 14:56:20. Root fs ~61% available. Final file backed up on the droplet. +- 15:36:48 temporary change on the droplet only: threshold `lt 15` -> `lt 70` in grafana/provisioning/alerting/sre.yaml; POST /api/admin/provisioning/alerting/reload -> "Alerting config reloaded" (no restart). Git kept 15. +- 15:36:50 Pending; polled every ~15 s; 15:41:50 Alerting/firing (pending period 5 m as configured). Notification expected ~15:42:00 (group_wait 10 s). +- 15:42:24 restored `lt 15` from the backup; reload -> "Alerting config reloaded". 15:42:41 rule inactive, no instances; Grafana Alertmanager active alerts: [] (resolved). +- Droplet rule file SHA-256 1614a4490202de44ec75c958ade3b79a3c207cc60e712a6be9804f3f01e49d9e = Git working copy. +- Side note: 15:30:05 GET /api/annotations returned 500 after 3.96 s during a dashboard load (memory pressure). +- Discord #devops-alerts (screenshots): 11:42 EDT "[FIRING:1] Root disk space low" Value A=61.343850329350225, C=1, labels device=/dev/vda1 fstype=ext4 mountpoint=/ owner=billy severity=warning, runbook_url present; then "[RESOLVED] Root disk space low" with grafana_state_reason=Updated (resolution came from the restored rule definition; at that moment free space 61.3% > 15%, so the restored condition is false). The summary text is static ("below 15% free") and did not reflect the temporary 70% threshold. + +## Controlled incident: Jenkins outage 2026-10-28 (UTC; EDT = UTC-4) + +- Pre-check: no Jenkins build process (python3/sh/git/durable) in gitea-jenkins-1; ci probe 1; HTTPS rule instances ci Normal, git Normal. (A first attempt aborted before injection because the check matched the ps header line.) +- 16:05:00 INJECT `cd ~/gitea && docker compose stop jenkins`; container stopped 16:05:06. +- Prometheus ci probe_success samples: 16:04:50 = 1; 16:05:20 = 0 (first failing probe); 0 at 16:05:50, 16:06:20, 16:06:50. +- Grafana rule HTTPS service down, instance ci: Normal until ~16:05:48; Pending observed 16:05:54; Alerting observed 16:06:52 (poll every ~6 s). Gitea instance Normal throughout. +- 16:07 (12:07 PM EDT) Discord "[FIRING:1] HTTPS service down SRE https://ci.yebilly.me/login (https billy critical)", Value A=0, C=1, runbook_url present (screenshot). +- Acknowledgement: Billy sent the FIRING screenshot to the operator (Claude session) before the restart; a Discord "ack" reply was posted afterward (its timestamp is later than the restart). +- 16:09:48 RESTART `cd ~/gitea && docker compose start jenkins` (4 min 48 s after injection). +- Jenkins log: 16:10:45.113 "Completed initialization"; 16:10:45.275 "Jenkins is fully up and running". +- ci probe_success: 0 at 16:09:50, 16:10:20; 1 at 16:10:50 (first successful probe). Rule ci instance Alerting until ~16:11:20; Normal observed 16:11:27. Gitea instance Normal throughout. +- (Host-side check with --resolve to 127.0.0.1 returned 403 throughout: the droplet's own loopback request arrives through docker-proxy as the probe gateway 172.30.90.1, which the allowlist denies. Not a service signal.) +- Measured: injection -> first failing sample 20 s; injection -> firing ~1 m 52 s (16:06:52); injection -> Discord ~2 m (16:07); restart -> Jenkins fully up 57 s; restart -> first successful probe sample 62 s; restart -> rule Normal ~1 m 32-39 s; probe-observed outage 16:05:20 -> 16:10:50 (5 m 30 s). Configured worst-case detection = scrape 30 s + evaluation 30 s + pending 60 s + group_wait 10 s = 2 m 10 s; observed ~2 m. +- 16:12 (12:12 PM EDT) Discord "[RESOLVED] HTTPS service down SRE https://ci.yebilly.me/login", Value A=1, C=0 (resolved by evaluation, no state-reason override) (screenshot). Notification receipt -> resolved message ~5 m. +- 16:11:46 laptop: https://ci.yebilly.me/login 200 0.254 s; https://git.yebilly.me/user/login 200 0.050 s. + +## Restart persistence 2026-10-28 (UTC) + +- Before 16:12:05: oldest TSDB sample 14:52:16; 160 `up{job="prometheus"}` samples in 2 h; dashboard Group 1 SRE v2 (7 panels); data source Prometheus http://prometheus:9090; rules HTTPS service down + Root disk space low (inactive); contact point team-alerts. +- 16:12:09 `docker compose restart prometheus`; answering 16:12:15. After: oldest sample still 14:52:16 (history kept on volume monitoring_prometheus_data). Raw scrapes node 16:11:36, 16:12:06, 16:12:36, 16:13:06; https 16:11:50, 16:12:20, 16:12:50: no gap > 35 s (restart fell between scrapes). +- 16:12:56 `docker compose restart grafana`; at 16:13:44 dashboard v2 7 panels, data source, both rules, contact point all present; admin login unchanged (volume monitoring_grafana_data). A restart shows persistence, not a backup restore. diff --git a/monitoring/grafana/dashboards/sre.json b/monitoring/grafana/dashboards/sre.json index b0f6bf5..f261489 100644 --- a/monitoring/grafana/dashboards/sre.json +++ b/monitoring/grafana/dashboards/sre.json @@ -20,7 +20,7 @@ "id": 1, "type": "timeseries", "title": "Droplet CPU utilization (%)", - "description": "Whole-droplet CPU busy %, averaged across CPUs: 100 minus the idle-time rate over 2m. Counts every workload on the host, not one container.", + "description": "Whole-droplet CPU busy %, averaged across CPUs: 100 minus the idle-time rate over 2m. Counts every workload on the host, not one container. The I/O wait line is the part spent waiting on disk (on this 1 GiB droplet, mostly swap-in), not computation.", "datasource": { "type": "prometheus", "uid": "prometheus" @@ -84,6 +84,15 @@ }, "expr": "100 * (1 - avg(rate(node_cpu_seconds_total{job=\"node\",mode=\"idle\"}[2m])))", "legendFormat": "CPU busy" + }, + { + "refId": "B", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "100 * avg(rate(node_cpu_seconds_total{job=\"node\",mode=\"iowait\"}[2m]))", + "legendFormat": "of which I/O wait" } ] },