Address chapter audit: collection-health alert, hardening, citations (refs #19)
vpn-dns-gateway/pipeline/pr-main This commit looks good
vpn-dns-gateway/pipeline/pr-main This commit looks good
An independent review of the SRE chapter against the instructor's rubric found gaps; each was fixed and, where operational, tested on the droplet. Monitoring: - New Grafana rule "Monitoring target down" (up < 1 for 1 m, no data -> Alerting). Tested by stopping Blackbox Exporter 17:34:44-17:37:52 UTC: it fired and resolved, and "HTTPS service down" fired on NoData when every probe series disappeared. - Blackbox Exporter runs as nobody (65534) instead of the image's root. - README: runbook for the new rule; contact-point test prompts for the password; secrets section reflects the replaced admin password. Manual (v5.0): - Alert table with all three rules and their summaries; runbooks in the PDF; accurate no-data description; collection-test figure. - Diagram shows networks per container and the existing volumes. - Targets table, CPU counters vs /proc/stat, probe module excerpt, container identities and mounts, backup command, exposure commands, replaced Grafana admin credential, PR #22 and review gate. - Bibliography enabled with SRE Workbook and tool documentation. - Corrected baseline memory figures, Jenkins start-up length, dashboard version wording, and start-up order; links point to main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+23
-4
@@ -26,8 +26,10 @@ GF_SECURITY_ADMIN_PASSWORD=<from the team password manager>
|
||||
DISCORD_WEBHOOK_URL=<webhook for #devops-alerts>
|
||||
```
|
||||
|
||||
The admin password applies only when Grafana first creates its database; later
|
||||
changes are made in Grafana and recorded in the password manager.
|
||||
The admin password applies only when Grafana first creates its database. At
|
||||
first login, change it in Grafana (Profile → Change password), store the new
|
||||
value in the password manager, and delete the `GF_SECURITY_ADMIN_PASSWORD`
|
||||
line from `.env.secret`; on The-Ocean this was done on 28 Oct 2026.
|
||||
|
||||
## Deploy
|
||||
|
||||
@@ -70,7 +72,7 @@ retries scrapes. All four services restart `unless-stopped`.
|
||||
|
||||
```bash
|
||||
GIP=$(docker inspect monitoring-grafana-1 --format '{{(index .NetworkSettings.Networks "monitoring_monitoring").IPAddress}}')
|
||||
P=$(docker exec monitoring-grafana-1 printenv GF_SECURITY_ADMIN_PASSWORD)
|
||||
read -rs -p 'Grafana password for billy: ' P; echo # typed, never stored
|
||||
curl -s -u "billy:$P" -H 'Content-Type: application/json' -X POST \
|
||||
-d '{"integration":{"uid":"team-alerts-discord","type":"discord","version":"v1","settings":{},"secureFields":{"url":true}}}' \
|
||||
"http://$GIP:3000/apis/notifications.alerting.grafana.app/v1beta1/namespaces/default/receivers/dGVhbS1hbGVydHM/test"
|
||||
@@ -91,10 +93,27 @@ retries scrapes. All four services restart `unless-stopped`.
|
||||
(volumes kept), then revert the `metrics` block and probe allowlist entry in
|
||||
`deploy/Caddyfile` and recreate Caddy.
|
||||
|
||||
## Runbook: Monitoring target down
|
||||
|
||||
Alert `Monitoring target down` (critical, owner Billy, backup Vincent): a
|
||||
Prometheus scrape target (`up`) has failed for 1 minute, or no target data
|
||||
exists. While it fires, the dashboard and the other alerts are partly blind.
|
||||
|
||||
1. Acknowledge in `#devops-alerts` with your name and the time.
|
||||
2. The `job` label names the broken collector: `blackbox` or `https` means
|
||||
Blackbox Exporter, `node` means Node Exporter, `prometheus` means Prometheus.
|
||||
3. On the droplet: `cd ~/monitoring && docker compose ps`, then
|
||||
`docker compose logs --tail=50 <service>`.
|
||||
4. Stopped: `docker compose start <service>`. Running but failing:
|
||||
`docker compose restart <service>`. Never use `down -v`.
|
||||
5. Confirm all targets are up again (dashboard *Scrape health* panel) and that
|
||||
Discord shows the resolved message.
|
||||
|
||||
## Runbook: HTTPS service down
|
||||
|
||||
Alert `HTTPS service down` (critical, owner Billy, backup Vincent): a login
|
||||
page's `probe_success` has been 0 for 1 minute, or the probe series is missing.
|
||||
page's `probe_success` has been 0 for 1 minute. If the probe series disappears
|
||||
instead, this rule can resolve; `Monitoring target down` reports that case.
|
||||
|
||||
1. Acknowledge in `#devops-alerts` with your name and the time.
|
||||
2. Open the `Group 1 SRE` dashboard. Is only one service down, or both?
|
||||
|
||||
Reference in New Issue
Block a user