diff --git a/monitoring/ARCHITECTURE.md b/monitoring/ARCHITECTURE.md index e99603c..75e5025 100644 --- a/monitoring/ARCHITECTURE.md +++ b/monitoring/ARCHITECTURE.md @@ -1,17 +1,17 @@ -Chapter 5 — Monitoring Architecture and Recovery Plan +Chapter 5 — Monitoring Architecture and Recovery Plan -Project: SSW 590 DevOps — Group 10 +Project: SSW 590 DevOps — Group 10 Repository: group10-startup/devops-it-manual Tracking issue: #1 Preparation branch: chapter5-sre-monitoring Prepared: October 28, 2026 -Status: Proposed architecture — not deployed or verified +Status: Proposed architecture — not deployed or verified 1. Objective Extend the existing Group 10 DevOps infrastructure with a reproducible monitoring system using Prometheus, Grafana OSS, Node Exporter, and Blackbox Exporter. -The system must monitor the Linux host’s CPU, available memory, and root filesystem capacity, as well as the HTTPS availability and response duration of Gitea and Jenkins. +The system must monitor the Linux host’s CPU, available memory, and root filesystem capacity, as well as the HTTPS availability and response duration of Gitea and Jenkins. The implementation must preserve the existing Gitea, Jenkins, Caddy, repositories, Jenkins pipelines, Gitea Actions workflows, and persistent application data. @@ -64,7 +64,7 @@ The team must: 4. Confirm adequate memory, disk capacity, and monitoring retention. 5. Record the selected deployment architecture and its justification. -The preferred design is a single appropriately sized Linux host. If monitoring runs on another host, Node Exporter must still report the intended Gitea/Jenkins Droplet’s resources, and the network architecture must be documented accurately. +The preferred design is a single appropriately sized Linux host. If monitoring runs on another host, Node Exporter must still report the intended Gitea/Jenkins Droplet’s resources, and the network architecture must be documented accurately. No Droplet resizing, new paid resources, or additional services should be provisioned without team approval. @@ -138,7 +138,7 @@ The following monitoring ports must not be publicly accessible: * Node Exporter: 9100 * Blackbox Exporter: 9115 -Grafana’s internal port 3000 must also remain private. +Grafana’s internal port 3000 must also remain private. Jenkins backend port 8080 and Gitea backend port 3000 must not be exposed directly to the public internet. @@ -316,8 +316,47 @@ Do not describe planned or untested behavior as verified. 15. Handoff Responsibilities -Turan — preparation: Architecture, proposed configuration, dashboard definitions, hypothetical calculations, alert and incident procedures, and initial manual documentation. +Turan — preparation: Architecture, proposed configuration, dashboard definitions, hypothetical calculations, alert and incident procedures, and initial manual documentation. -Sergio — implementation: Capacity approval, deployment, networking, security, persistence, live verification, alert testing, controlled incident, evidence collection, final manual updates, reviewed merge, and PDF submission. +Sergio — implementation: Capacity approval, deployment, networking, security, persistence, live verification, alert testing, controlled incident, evidence collection, final manual updates, reviewed merge, and PDF submission. -Current status: Preparation only. Monitoring deployment and operational verification remain pending. \ No newline at end of file +Current status: Preparation only. Monitoring deployment and operational verification remain pending. + +## Verified deployment checkpoint: October 30, 2026 +The primary droplet (165.227.90.215) was resized with approval to 2 GiB RAM, +1 vCPU, retaining its 10 GB disk. A pre-resize snapshot is available as 252241628. +Current monthly resource prices: primary $12, second existing droplet $4, +5.65 GB retained snapshot approximately $0.34. No disk expansion was approved. + +Monitoring is deployed separately at /opt/ssw590-monitoring. Grafana uses +https://metrics.165.227.90.215.sslip.io and authenticated login; no monitoring +container publishes a host port. Caddy configuration was backed up before reload. +Blackbox Exporter has private address 172.18.0.250 on gitea_default; only this +/32 was added to the existing Jenkins allowlist. It resolves both HTTPS names +to Caddy's inspected private address 172.18.0.3 using CADDY_PRIVATE_IP. +Verify that address after any Caddy recreation and recreate Blackbox if it changes. +This measures a private proxy route with real hostname/TLS verification, not +reachability from every external network. Whole-droplet failure also stops monitoring. + +Pinned images: Prometheus v3.15.1, Grafana 13.3.0-slim, Node Exporter v1.12.1, +Blackbox Exporter v0.29.1. The full Grafana image and its unsolicited optional +plugin downloads consumed too much storage; only those new disposable artifacts +were removed. No application data or named volume was deleted. The slim image +needs only the Prometheus plugin, installed at 13.2.4 with: + docker compose exec grafana grafana cli plugins install prometheus 13.2.4 + docker compose restart grafana +Optional plugin preinstallation and updates are disabled. Provisioning directories +must be mode 755 and non-secret provisioning files mode 644 so UID 472 can read them. +Keep .env mode 600 and outside Git. Preserve its generated Grafana admin credential. +Required local settings: GRAFANA_ADMIN_PASSWORD, GRAFANA_ROOT_URL, +CADDY_PRIVATE_IP. Run docker compose config --quiet; never publish expanded config. +Prometheus retention is seven days or 512 MB of retained blocks, whichever is reached +first; WAL/head storage is additional. Monitor remaining disk and avoid large upgrades +without checking transient extraction space. + +Runtime checks: all five scrape targets up=1, both HTTPS probe_success=1; +Grafana data source, six panels and two provisioned rules loaded. Root labels are +mountpoint=/, device=/dev/vda1, fstype=ext4. Node memory total 2063564800 bytes +matches the host. Dashboard screenshots, notification delivery, incident, pipeline, +persistence and final PDF evidence remain pending. A local preliminary PDF compiled, +but the automated workflow and glossary generation are not yet verified.