Files
devops-it-manual/devopsSREMonitoring.tex
T
2026-10-30 21:28:50 +00:00

546 lines
33 KiB
TeX

\chapter{Introduction to SRE: Monitoring and Reliability}
\ChapterLabel{SREMonitoring}
\index{monitoring}\index{incident review}\index{error budget}
\section{Deployment and Reproducibility}
\subsection{Scope, baseline, and decisions}
Group 10 deployed four monitoring containers on October 30, 2026, using Turan
Islamli's prepared branch and Sergio Espinal's authorized operational changes.
This report records actual tests, rather than treating configuration as proof.
\href{https://git.sespinal590.dev/group10-startup/devops-it-manual/issues/1}{Implementation issue 1}
records the initial baseline, starting manual commit \path{1df4798a31}, and
preparation/deployment responsibilities. Sergio and Turan are both assigned;
Sergio operates the deployment and Turan is the second team member for final
verification. Formal assignment was corrected during this audit; independent
peer approval is still pending in draft PR 4.
The implementation remains on \path{chapter5-sre-monitoring}; main has not
been merged. Human peer review remains outstanding.
The Ubuntu 24.04 primary Droplet (165.227.90.215) originally had approximately
458 MiB RAM. An approved snapshot, ID 252241628, was retained before resizing
CPU/RAM to 1 vCPU and 2 GB. The disk remains 10 GB as requested. Its root
filesystem reports 8.7 GiB usable, approximately 7.0 GiB used and 1.8 GiB
available (81\% used). Snapshot existence does not demonstrate a restore.
The primary plan is \$12/month; the separate unchanged 512 MB Droplet costs
\$4/month; the 5.65 GB snapshot is approximately \$0.34/month. Known total:
approximately \$16.34/month before taxes or other usage. Sergio owns these
resources and should remove the snapshot only after deciding it is no longer
needed. No additional paid service was provisioned for monitoring.
The full Grafana image and optional plugin downloads temporarily exhausted disk
space during installation. Grafana was stopped, only the new full image and
optional downloaded plugin files were removed, and the slim image was used.
The Grafana database and all named volumes were preserved. The resulting image
is approximately 1.23 GB rather than 2 GB. Only the Prometheus plugin 13.2.4
was installed; automatic plugin preinstallation and updates are disabled.
The retained free-space margin is small and must be monitored.
\subsection{Versions, storage, and actual topology}
The deployed images are \path{prom/prometheus:v3.15.1},
\path{grafana/grafana:13.3.0-slim},
\path{quay.io/prometheus/node-exporter:v1.12.1}, and
\path{quay.io/prometheus/blackbox-exporter:v0.29.1}. Publisher digests
captured with \texttt{docker image inspect} are recorded below. Versions are
pinned in Compose; the digests identify the images actually inspected.
\begin{figure}[htbp]\centering\small
\fbox{\begin{minipage}{0.94\linewidth}\centering
\textbf{Primary Droplet: Ubuntu 24.04, 1 CPU, 2 GB RAM, 10 GB disk}\\[5pt]
Browser $\xrightarrow{\mathrm{HTTPS}\ 443}$ \fbox{Caddy}\\
\path{gitea_default} proxy network: Caddy routes by hostname\\[4pt]
\fbox{Gitea :3000}\quad \fbox{Jenkins :8080}\quad
\fbox{Grafana :3000}\\[5pt]
\textbf{Four separate monitoring containers}\\
\fbox{Grafana} $\xrightarrow{\mathrm{query}}$ \fbox{Prometheus :9090}\\[4pt]
Prometheus $\xrightarrow{\mathrm{scrape\ every\ }30s}$
\fbox{Node Exporter :9100}\quad host /proc, /sys, /\\[4pt]
Prometheus $\xrightarrow{\mathrm{probe\ request}}$
\fbox{Blackbox Exporter :9115}\\
Blackbox $\xrightarrow{\mathrm{TLS}\ 443}$ Caddy
$\rightarrow$ Gitea /user/login and Jenkins /login\\[4pt]
\path{monitoring_monitoring_private}: all four monitoring services\\
Grafana and Blackbox additionally join \path{gitea_default}.\\
Grafana $\xrightarrow{\mathrm{outbound\ HTTPS}}$ Discord team alerts\\[4pt]
\textbf{Persistent storage:} Prometheus named volume $\rightarrow$ /prometheus;\\
Grafana named volume $\rightarrow$ /var/lib/grafana;\\
existing Gitea /data and Jenkins /var/jenkins\_home retained.\\
Configuration bind mounts originate in /opt/ssw590-monitoring.\\
Existing applications remain in /opt/gitea and /opt/jenkins.\\[4pt]
\textbf{CI outside this diagram's metrics:} Windows LaTeX runner polls Gitea;\\
Jenkins application build executes on the primary controller.
\end{minipage}}
\caption{Actual deployment, October 30, 2026. Internal ports are not public
listeners. Grafana is shown twice to clarify its query role, not as two containers.}
\label{Figure:SRETopology}\end{figure}
Prometheus retains up to seven days or 512 MB of stored blocks, whichever
limit applies first. WAL/head storage is additional, so this is not a hard
filesystem quota \cite{PrometheusStorage}. Grafana stores its SQLite database
and installed plugin in its named volume. Removing volumes would destroy this
persistence. All four containers use \texttt{unless-stopped} restart policies.
\subsection{Repeatable operations}
Check out the feature branch and copy the non-secret \path{monitoring/}
directory to \path{/opt/ssw590-monitoring}. Privately supply the admin password,
Grafana root URL, and the current Caddy private IP in a mode-600 \texttt{.env}.
The proxy network must already exist. Confirm its subnet and that
172.18.0.250 is unused before assigning Blackbox's fixed address. Set readable
configuration directories to 755 and non-secret files to 644. Keep the local
Discord provisioning file owned by UID 472, group 0, mode 600.
\begin{lstlisting}[basicstyle=\ttfamily\scriptsize,breaklines=true]
cd /opt/ssw590-monitoring
docker compose config --quiet
docker compose up -d
docker compose exec grafana grafana cli plugins install prometheus 13.2.4
docker compose restart grafana
docker compose ps
docker exec monitoring-prometheus-1 promtool check config /etc/prometheus/prometheus.yml
\end{lstlisting}
The commands were executed successfully during deployment. For updates, review
image/plugin compatibility and available disk first, retain a backup, validate
configuration, and recreate only the affected service. Do not run
\texttt{down -v}. Recovery starts with \texttt{docker compose up -d}, target
health and logs; restore known-good configuration before escalating to a backup
restore. Reinstall the pinned plugin if rebuilding the Grafana volume.
\subsection{Inspected publisher digests}
\begin{lstlisting}[basicstyle=\ttfamily\tiny,breaklines=true]
prom/prometheus@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2
grafana/grafana@sha256:a66f098dd9b2e1b5a19287ff176db02d895122488c6e39b3dfcd3fb897039225
quay.io/prometheus/node-exporter@sha256:1b4e4438faca4dd7e001dd445d161a4a2091b0fededa84093b3a8dfeae1f1be0
quay.io/prometheus/blackbox-exporter@sha256:ea1c7aa3ef3f307cd03e85f34abb604478ccb90b567fc690da0cd9776da76b13
\end{lstlisting}
\subsection{Backup of state that Git cannot reconstruct}
The retained cloud snapshot predates monitoring. A current monitoring backup
and an isolated restore have not been performed. The operator procedure is
versioned in \path{monitoring/BACKUP-RECOVERY.md}. Arrange a maintenance window,
check capacity, stop Grafana before copying SQLite, and stop Prometheus before
copying its complete data directory. Preserve the two inspected named-volume
paths, ownership and permissions. Protect the local environment, Discord
provisioning and Caddy configuration separately; these contain secrets and
must stay outside Git. Transfer using a binary-safe SSH/archive tool to an
approved encrypted off-host destination, verify checksums, restart in a
finally/trap cleanup path and check historical data plus alert delivery.
The small root disk must not be used to stage an unbounded archive.
Restore into isolated replacement volumes with matching versions/plugin first;
never overwrite the live volumes to demonstrate recovery. This procedure
extends the published Grafana backup guidance \cite{GrafanaBackup}.
\section{Metrics and Probes}
Prometheus privately scrapes itself, Node Exporter and Blackbox Exporter, plus
two relabeled HTTPS probe targets every 30 seconds. Five \texttt{up} series
were 1 at the verification checkpoint; both \path{probe_success} values
were 1 after recovery. A successful scrape (\texttt{up}) means collection
worked; it does not establish that the application probe succeeded.
Node Exporter has read-only host-root and proc/sys access. Its
\path{node_memory_MemTotal_bytes} was 2,063,564,800 bytes, consistent
with host \texttt{free}. The root series labels were verified as
\path{device=/dev/vda1}, \path{mountpoint=/}, \texttt{fstype=ext4},
matching \texttt{df}. This excludes container overlay filesystems.
The HTTPS module requires HTTP 200, valid certificate verification and a
response before its timeout. Targets are the actual TLS login URLs below.
The exporter resolves both hostnames to Caddy's private 172.18.0.3 address,
retaining their hostname/SNI and TLS verification. This measures the private
proxy/application route; it cannot establish public DNS or external Internet
availability. A shared-host outage also stops its own monitoring.
\subsection{Metric inventory and host comparison}
\small
\begin{tabularx}{\linewidth}{L{4.0cm}L{2.0cm}Y}
\caption{Required metric inventory\label{Table:SREMetricInventory}}\\
\toprule Metric & Type / unit & Labels, meaning and limitation\\\midrule
\path{node_cpu_seconds_total} & Counter / seconds & cpu, mode, job, instance.
Cumulative CPU time; rate of idle time gives averaged non-idle percent.
Not per-container attribution.\\
\path{node_memory_MemAvailable_bytes} & Gauge / bytes & job, instance.
Kernel estimate of memory available to applications, not merely unused RAM.\\
\path{node_filesystem_avail_bytes}, \path{node_filesystem_size_bytes} & Gauges / bytes &
job, instance, device, mountpoint, fstype. Available/size percent for the verified
root filesystem; do not combine mounts or use overlay data.\\
\texttt{up} & Generated gauge / 0 or 1 & job, instance. Prometheus collection
health, not application health. A missing sample remains unknown.\\
\path{probe_success} & Gauge / 0 or 1 & job, instance (HTTPS URL).
Login-page TLS/HTTP probe success; does not prove authenticated operations.\\
\path{probe_duration_seconds} & Gauge / seconds & job, instance.
Probe duration includes failures/timeouts; not application transaction latency.\\
\bottomrule\end{tabularx}
\normalsize
At the final audit, \texttt{free -b} reported total memory 2,063,564,800 bytes,
matching Node Exporter exactly. Host available memory was 852,103,168 bytes;
the most recent 30-second scrape reported 890,720,256, reflecting different
sample times while processes ran. \texttt{df -B1 /} and the exporter agreed on root size:
9,283,444,736 bytes. Available space changed from 1,825,554,432 to
1,825,574,912 bytes between observations, a difference of 20,480 bytes.
The raw comparisons and timestamps are retained in
\path{evidence/chapter5/host-metric-comparison.json}.
Node Exporter uses the host PID namespace and read-only host root mounted at
\texttt{/host}, with proc/sys/rootfs flags selecting the host view. This exposes
host metadata for collection; no monitoring container receives the Docker socket.
\subsection{Sanitized collection and probe configuration}
These are the actual versioned files used in the running deployment:
\lstinputlisting[basicstyle=\ttfamily\scriptsize,breaklines=true]{monitoring/prometheus/prometheus.yml}
\lstinputlisting[basicstyle=\ttfamily\scriptsize,breaklines=true]{monitoring/blackbox/blackbox.yml}
Only the final login page is checked; there is no authenticated content test.
\section{HTTPS and Access Control}
\begin{itemize}
\item Gitea login: \url{https://git.sespinal590.dev/user/login}.
\item Jenkins login: \url{https://ci.165.227.90.215.sslip.io/login}.
\item Grafana: \url{https://metrics.165.227.90.215.sslip.io}.
\end{itemize}
Use the team account for Gitea, the existing administrator's approved Jenkins
access path, and the privately held Grafana admin password. Anonymous Grafana
access and self-registration are disabled; its cookie is secure. No grader
account is required to read the embedded evidence.
Caddy provides HTTPS and forwards the metrics hostname to
\texttt{grafana:3000}. The existing Jenkins IP restriction was retained with
only Blackbox's 172.18.0.250/32 added. A public 403 from an unapproved source
is expected access denial and is not treated as successful availability.
The exporter obtained 200 from Jenkins through the narrow permitted route.
Caddy's configuration was backed up before modification.
\begin{lstlisting}[basicstyle=\ttfamily\scriptsize,breaklines=true]
# Existing Jenkins allowlist plus the one monitoring address:
remote_ip 155.246.151.38/32 172.18.0.1/32 172.18.0.250/32
# Additional HTTPS virtual host:
metrics.165.227.90.215.sslip.io {
@rawMetrics path /metrics /metrics/*
respond @rawMetrics "Raw metrics are private." 403
reverse_proxy grafana:3000
}
\end{lstlisting}
The inspected users are Prometheus/Node Exporter \texttt{nobody}, Grafana UID
472, and the Blackbox image default user (empty image user setting, Linux
root by default). Its configuration is read-only and no Docker socket is
mounted. No monitoring service has Compose host-port mappings. External TCP checks from
Sergio's Windows workstation on October 30 could not connect to primary ports
3000, 8080, 9090, 9100 or 9115. HTTPS remained reachable. These are point-in-time
observations from that source, not a universal firewall guarantee.
\subsection{Final network audit and retained SSH gap}
The signed-in DigitalOcean console confirmed firewall
\texttt{ssw590-gitea-firewall} is attached to the primary Droplet. It permits
TCP 80 and 443 publicly, and TCP 22 from all IPv4 plus an existing operator
/32. Other inbound ports are not allowed; outbound ICMP/TCP/UDP are allowed.
Host UFW is inactive, so protection relies on the cloud firewall, Docker port
mappings and Caddy. IPv6 is not enabled on the Droplet and the host has no
global IPv6 address; external IPv6 checks are therefore not applicable.
\textbf{Open gap: SSH is still globally reachable over IPv4. Sergio explicitly
requested that SSH be left unchanged and flagged.} This inherited policy is
not represented as a restricted SSH configuration.
The audit found Grafana's unauthenticated raw \texttt{/metrics} route returning
200 through HTTPS. Caddy was backed up, the route was blocked with the matcher
above, and configuration validation/reload passed. The versioned final proxy
configuration is \path{monitoring/Caddyfile}.
From the external Windows workstation at 21:16:31 UTC, TLS-verified
\texttt{curl.exe} checks returned: Gitea login 200, Gitea metrics 404,
Grafana login 200, Grafana raw metrics 403, and restricted Jenkins login 403.
HTTP Gitea login redirected to HTTPS with 308. Socket checks with three-second
timeouts could not connect to ports 3000, 8080, 9090, 9100 or 9115.
These commands and results are retained in
\path{evidence/chapter5/external-access-audit.json}; sanitized cloud rules and
container identities/mounts are retained alongside them. Both private HTTPS
probes and authenticated Grafana queries remained healthy after the proxy fix.
\begin{tabularx}{\linewidth}{L{3cm}Y}
\caption{Chapter 5 hosts, storage and credential hints\label{Table:SREHosts}}\\
\toprule Service / owner & Address, exposure, storage or secret handling\\\midrule
Primary / Sergio & 165.227.90.215; Caddy HTTPS 443; SSH for approved operators.
Snapshot retained; monitoring runs here.\\
Grafana / Sergio & metrics hostname above; private 3000; named Grafana volume.
Admin secret stays in root-owned server .env; never in Git or PDF.\\
Prometheus / Sergio & Private prometheus:9090; named metrics volume; no user-facing login.\\
Exporters / Sergio & Private node-exporter:9100 and blackbox-exporter:9115;
read-only configuration/host mounts.\\
Discord / team & Dedicated Discord integration; secret destination in
\texttt{discord.local.yml} on server only. Rotate via Discord if exposed.\\
\bottomrule\end{tabularx}
These entries supplement the existing Hosts and Password Hints tables in
\ChapterRef{Gitea}; no credentials are reproduced.
\section{Dashboard and CI Correlation}
The provisioned dashboard is \textit{Chapter 5 -- SRE Monitoring Overview}, UID
\texttt{sre-overview}, UTC, default one hour, refresh 30 seconds. Its versioned
source is \path{monitoring/grafana/dashboards/sre-overview.json}. The six
panels use the following expressions (each line is one panel's query).
\begin{lstlisting}[basicstyle=\ttfamily\scriptsize,breaklines=true]
100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle",job="node-exporter"}[5m])))
node_memory_MemAvailable_bytes{job="node-exporter"}
100 * node_filesystem_avail_bytes{job="node-exporter",mountpoint="/",fstype!~"tmpfs|overlay"} / node_filesystem_size_bytes{job="node-exporter",mountpoint="/",fstype!~"tmpfs|overlay"}
probe_success{job="https",instance="https://git.sespinal590.dev/user/login"}
probe_success{job="https",instance="https://ci.165.227.90.215.sslip.io/login"}
probe_duration_seconds{job="https"}
\end{lstlisting}
CPU is the non-idle fraction averaged over CPUs, percent; available RAM is
bytes rendered in GiB/MiB; root availability is percent for the one verified
root mount; service lines are binary 0/1; durations are seconds with separate
Gitea/Jenkins legends. Availability is not an HTTP request error rate for
all users. Whole-host CPU cannot be attributed solely to Jenkins.
\begin{figure}[p]\centering
\includegraphics[width=\linewidth,height=0.82\textheight,keepaspectratio]{evidence/chapter5/dashboard-live.png}
\caption{Actual Grafana six-panel dashboard, October 30, 2026, UTC.
The Jenkins-only outage is visible while Gitea stays at 1.}
\label{Figure:SREDashboard}\end{figure}
After recovery, Jenkins \path{startup-product-ci/main} build 3 passed for
commit \path{6cfac4ec1e6d56dbb0b1a66bd59775b9db6ed065}.
It ran from 20:43:32.534 to 20:43:52.340 UTC (19.806 seconds), on the Jenkins
controller. See \url{https://ci.165.227.90.215.sslip.io/job/startup-product-ci/job/main/3/}.
The host measurements immediately before, during and after this build were:
\begin{center}\begin{tabular}{lrr}\toprule
UTC evaluation & CPU (one-minute rate) & Available RAM (MiB)\\\midrule
20:43:00 (before) & 41.57\% & 878.0\\
20:43:45 (during) & 17.40\% & 863.8\\
20:44:30 (after) & 17.67\% & 914.5\\\bottomrule
\end{tabular}\end{center}
The short build's CPU peak is not established by these snapshots. They include
Jenkins initialization, monitoring and other work; the 30-second scrape cadence
and one-minute rate smooth the 19.8-second build. The dashboard uses five-minute
CPU smoothing. Available RAM fell slightly during the build and rose afterward,
which is correlation rather than proof of per-container allocation.
The Windows LaTeX workflow executes off-droplet, so its build load is not
measured by these host metrics.
\section{SLI, SLO, and Error Budget}
An \gls{sli} is a measured indicator; here it is successful HTTPS observations
divided by received observations for a named service and window. The
\gls{slo} is an internal target of at least 99\% success over 24 hours. An
\gls{sla} is a customer agreement that may attach consequences; this lab
establishes no customer SLA.
\subsection{Required hypothetical example}
These figures are illustrative, not measured lab results. At 30 seconds,
24 hours schedules $24\times60\times2=2880$ probes per service.
Gitea's $2880/2880=100\%$ meets the target. Jenkins's
$2850/2880\times100=98.9583\%$ misses it, with 30 failures.
The theoretical budget is $0.01\times2880=28.8$ failures or
$28.8\times30/60=14.4$ minutes. At most 28 whole failed samples meet 99\%.
Thirty failures exceed the budget by 1.2 samples, approximately 0.6 minutes.
\subsection{Measured short exercise window}
The actual interval is (20:35:00,20:45:00] UTC on October 30, evaluated at
20:45:00 with a 30-second scrape interval. Queries were
\path{avg_over_time}, \path{count_over_time} and
\path{sum_over_time} of \texttt{probe\_success\{job="https"\}[10m]}.
Multiply the average by 100 for percent.
\begin{center}\begin{tabular}{lrrrr}\toprule
Service & Received / expected & Successes & Failures & Percent\\\midrule
Gitea & 20 / 20 & 20 & 0 & 100\%\\
Jenkins & 20 / 20 & 13 & 7 & 65\%\\\bottomrule
\end{tabular}\end{center}
Both have 100\% sample coverage in this short window. The services have
different scrape phases, so timestamps differ; no samples were missing in
this interval. Seven failed Jenkins samples correspond to approximately
3.5 minutes under uniform sampling. Actual endpoints transitioned between
scrapes, so sample counts do not provide continuous-time precision. Missing
observations in another window would be unknown, not successes. This exercise
does not establish whether the full 24-hour SLO was met.
\section{Alerts and Runbooks}
Both Grafana-managed rules have owner \texttt{sespinal}, a 30-second evaluation
interval, summaries and links to \path{monitoring/ALERTING-RUNBOOK.md}.
Service unavailability uses \texttt{probe\_success\{job="https"\}<1}, pending
one minute, severity critical, retaining instance labels. Disk uses the same
verified root percentage as the dashboard, below 15\% for five minutes,
severity warning. Fifteen percent provides a response margin on this small disk.
No-data state is \texttt{NoData}; evaluation errors are \texttt{Error}, rather
than healthy. Grafana creates separate data-source alerts for these conditions
\cite{GrafanaNoData}. The service expression additionally uses a zero-valued fallback from the
matching target \texttt{up} series when its probe series disappears:
\texttt{or on(instance,job) (0 * up\{job="https"\})}. Thus a failed
collection does not silently become a successful probe. Removing a target
from configuration still requires source review; it is not an availability fix.
\begin{figure}[htbp]\centering
\includegraphics[width=\linewidth]{evidence/chapter5/alerts-recovered.png}
\caption{Actual Grafana group showing both provisioned rules normal after the
tests, October 30, 2026. The rule-state JSON records retain firing transitions.}
\label{Figure:SREAlerts}\end{figure}
Both route through the dedicated Discord integration in contact point
\texttt{team-alerts}. Policy groups by folder and alert name, waits 10 seconds,
uses a 30-second group interval and four-hour repeat interval. Resolved messages
are enabled. The webhook is stored only in server-local provisioning. The
contact test succeeded, and Sergio confirmed its receipt, then confirmed
receipt of both real firing and both resolved notifications.
Sergio reported these Discord display times in New York (EDT, UTC--4):
Jenkins firing 16:40, Jenkins resolved 16:42, disk firing 16:43, disk resolved
16:43. Converted to UTC: 20:40, 20:42, 20:43 and 20:43. These are user-reported
minute-precision receipt records; exact seconds and a separate channel
acknowledgement timestamp were not retained. They cannot establish precise
notification latency and must not replace the higher-resolution server records.
For HTTPS failures, inspect the instance, \texttt{up}, Blackbox diagnostics,
TLS, Caddy and application state. Keep TLS verification and the Jenkins
allowlist intact; restart only the affected service and verify probe recovery
and CI. For disk, inspect \texttt{df}, Docker images and volume/log growth;
remove only verified disposable material after review. Preserve application
and monitoring volumes. Recheck the filesystem and resolved state.
The disk test changed only its threshold from 15 to 30\% at 20:37:26.770 UTC.
It reached firing by observation 20:42:57.308, after five minutes pending.
The script's \texttt{finally} block restored 15\% at 20:43:27.486; it was
inactive by 20:43:57.520. No disk-filling workload was used.
\section{Incident and Recovery}
\subsection{Controlled Jenkins incident and measurements}
The exercise stopped only Jenkins, retaining all volumes and the recovery
command. A 210-second systemd safety timer was installed before stopping it;
the primary script restarted it after approximately three minutes. Gitea,
Caddy and the four monitoring containers remained available during the outage.
All times below are October 30, 2026 UTC.
\begin{tabularx}{\linewidth}{L{3.6cm}Y}
\caption{Observed incident timeline\label{Table:SRETimeline}}\\
\toprule Time & Event and evidence\\\midrule
20:38:45.484 & Jenkins stop requested; stopped at 20:38:46.995.\\
20:39:09.110 & First recorded failed Jenkins probe; previous success 20:38:39.110.\\
20:40:30 evaluation & HTTPS alert firing, observed by polling at 20:40:57.\\
20:41:47.511 & Restart requested; container started 20:41:47.945.\\
20:42:09.110 & Probe still failed while Jenkins initialized.\\
20:42:39.110 & First successful post-outage probe.\\
20:43:27.344 or earlier & Rule observed inactive; subsequent evaluations stayed normal.\\
20:43:32.534--52.340 & Recovery pipeline build 3 SUCCESS.\\
\bottomrule\end{tabularx}
Stop request to first failed sample was 23.626 seconds. First failure to the
20:40:30 firing evaluation was 80.890 seconds, consistent with scrape phase,
30-second evaluation and one-minute pending. Stop request to first recovered
sample was 233.626 seconds; restart request to that sample was 51.599 seconds.
Seven failed probes bound the observed failure period. Discord firing/resolved receipt was confirmed by Sergio at the minute-level
times above. Sub-minute delivery and acknowledgement latencies cannot be
calculated from these records.
\subsection{Persistence and integration checks}
Prometheus and Grafana were restarted separately without volume deletion.
A historical instant query at 20:40:00 returned Jenkins 0 and Gitea 1 both
before and after the Prometheus restart. Grafana's health returned database OK;
dashboard UID \texttt{sre-overview}, both rules (1m/5m) and the Discord contact
point remained. The retained 30-minute Prometheus self-scrape range contained no adjacent
sample gap greater than 45 seconds around the restart (30-second nominal
cadence). A short restart can fall between scheduled scrapes. The complete
10-minute SLI window above predates the restart. This test demonstrates persistence, not backup
restoration. Raw sanitized records are under \path{evidence/chapter5/}.
Gitea Actions manual-pdf run 16 (displayed build 12), source
\path{2fc6e8909034bd615fd5f3caffd71f0ef386d18f}, passed in 44 seconds
before final documentation changes:
\url{https://git.sespinal590.dev/group10-startup/devops-it-manual/actions/runs/16}.
The final automated artifact carries build \WorkflowRunNumber{} and source
\href{https://git.sespinal590.dev/group10-startup/devops-it-manual/commit/\SourceRevision}{\SourceRevision{}} in its generated metadata.
Its workflow record is available from
\href{https://git.sespinal590.dev/group10-startup/devops-it-manual/actions}{the repository Actions page}.
Human approval of this source revision is still required. Chapter 4's test/build failure
is different: code can fail a pipeline while Jenkins remains available.
Here the CI server itself was unavailable, so jobs could not execute during
that interval. Retained Chapter 4 records link
\href{https://ci.165.227.90.215.sslip.io/job/startup-product-ci/job/PR-9/1/}{failed PR-9 build 1}
(commit \path{35605c33b903742cd13d444a1a14d61b07fbaa86}) and
\href{https://ci.165.227.90.215.sslip.io/job/startup-product-ci/job/PR-9/2/}{repaired build 2}
(commit \path{ed8684a2897c407946320183e572f6412dbb7703}, SUCCESS).
Those historical records do not establish current peer-review status.
The recovery build published a fresh success status to Gitea at 20:43:52 UTC,
context \path{startup-product-ci/pipeline/head}, target build 3, matching
commit \path{6cfac4ec1e6d56dbb0b1a66bd59775b9db6ed065}.
The repository has no configured webhook; its configured periodic repository
scan uses \texttt{* * * * *} (once per minute). The following separate check
verifies automatic discovery rather than claiming webhook delivery.
\subsection{Automatic application-trigger verification}
A documentation-only commit was published on isolated application branch
\path{codex/chapter5-trigger-check}; application code and the existing
Jenkinsfile were unchanged. The exact commit is
\href{https://git.sespinal590.dev/group10-startup/startup-product/commit/b39613b2d2869065cf363bff36a7b54225cb7438}{b39613b2d2869065cf363bff36a7b54225cb7438},
created at 21:12:56 UTC (17:12:56 EDT). No Jenkins build or repository scan
was requested manually. Its scheduled scan discovered the branch and started
build 1 at 21:13:17.934; it ended SUCCESS at 21:13:22.127 UTC, 4.193 seconds
later. The retained cause is \path{jenkins.branch.BranchIndexingCause}, with
no manual user cause. Checkout matched the exact commit and all three unit
tests passed on the controller. Gitea received
\path{startup-product-ci/pipeline/head}=success for that commit at 21:13:22.
The observed commit-to-build delay was approximately 22 seconds, consistent
with one-minute polling. This is polling evidence, not a webhook receipt.
The application main remains \path{6cfac4ec1e6d56dbb0b1a66bd59775b9db6ed065}.
See the \href{https://ci.165.227.90.215.sslip.io/job/startup-product-ci/job/codex\%252Fchapter5-trigger-check/1/}{automatic application build}
and \path{evidence/chapter5/automatic-trigger.json}. Historical incident,
recovery build and automatic build regions were added to the Grafana dashboard
using measured timestamps; \path{dashboard-annotations.json} records them.
\begin{figure}[p]\centering
\includegraphics[width=\linewidth,height=0.8\textheight,keepaspectratio]{evidence/chapter5/dashboard-annotated.png}
\caption{Actual incident dashboard with measured outage and recovery-build
annotation regions added during the final Chapter 5 audit.}
\label{Figure:SREAnnotations}\end{figure}
\subsection{Blameless review and owned improvements}
The intended maintenance injection caused the incident. Jenkins initialization
extended user-visible unavailability beyond the stopped-container interval.
Detection worked; Gitea remained successful throughout the measured window;
Jenkins recovered and a normal build passed. No person is blamed for the
capacity issue: the original disk budget was too small for the default image
and optional plugins, and the slim deployment restored a workable margin.
The current setup shares the failure domain it monitors. It also relies on
Caddy's dynamic private IP, and receiver timestamps were retained only to the minute; a separate
acknowledgement time was not captured. The following owned issues track improvements:
\begin{itemize}
\item \href{https://git.sespinal590.dev/group10-startup/devops-it-manual/issues/2}{Issue 2},
P1, Sergio (\texttt{sespinal}): add an independent external TLS availability
check; verify notification and recovery without exposing private ports.
\item \href{https://git.sespinal590.dev/group10-startup/devops-it-manual/issues/3}{Issue 3},
P2, Turan (\texttt{turanisl}): remove fragile proxy-address dependence and
verify coordinated rebuilds, private access, TLS and rollback.
\end{itemize}
\section{Manual Integration and Traceability}
Source and prepared configuration are retained on the feature branch.
The workflow indentation and master include typo were repaired first.
The final PDF includes the source revision from workflow build metadata.
Use that revision to inspect the exact source, rather than relying only on a
moving branch link. The updated history, service/secret-hints table, glossary,
references and AI log accompany this chapter.
\paragraph{Review boundary.}
Deployment, rule evaluation, notification receipt, controlled recovery and
persistence have measured evidence. Human peer review and main merge remain
outstanding; main merge is explicitly deferred by Sergio. Receiver timing is limited to user-reported minutes; a separate channel
acknowledgement timestamp was not captured during the incident. The automatic
application trigger is now verified. Public IPv4 SSH is explicitly deferred by
Sergio, and human peer review plus the requested unmerged status remain open. A successful PDF build does not close those gaps.
\subsection{Final Chapter 5 rubric audit}
This is an evidence audit, not a prediction of the instructor's grade.
\small
\begin{tabularx}{\linewidth}{L{3.5cm}Y}
\caption{Eight-section final audit\label{Table:SREFinalAudit}}\\
\toprule Requirement & Result and retained boundary\\\midrule
Deployment (15 points) & Four pinned containers, digests, topology, retention,
startup/recovery and persistent volumes verified. Backup procedure supplied;
current-state backup restore not claimed.\\
Metrics/probes (15) & Five scrapes healthy, host comparison and metric inventory
recorded; both real HTTPS login probes pass. Private-route limitation explicit.\\
Access control (10) & Authenticated HTTPS, private ports and external tests pass;
public Grafana metrics route fixed. Inherited global IPv4 SSH remains an
explicit user-deferred gap.\\
Dashboard/CI (15) & Six panels, queries/units, versioned definition and normal
build correlation present; measured timeline annotation regions added.\\
SLI/SLO (10) & Definitions, hypothetical budget and actual 20-sample-per-service
exercise window present. No full-day SLO claim; full-day collection is optional.\\
Alerts (15) & Both evaluated/fired/resolved and received in Discord; disk restored
to 15\%. Receiver times are user-reported to the minute, not exact seconds.\\
Incident (10) & Jenkins-only outage, measured detection/recovery, persistence,
passing recovery build, automatic exact-commit build/status and two owned
improvement issues verified. Separate channel acknowledgement time absent.\\
Manual/review (10) & Updated version/history, service/secret hints, inventory,
citations, attribution and automated build metadata present. Draft PR 4 is
unmerged; genuine second-member approval is still required.\\
\bottomrule\end{tabularx}
\normalsize
The user explicitly requested no main merge. Do not close the implementation
issue or present the source as peer-approved until that review occurs. The
remaining human review and deferred SSH policy are recorded openly rather
than being marked complete by automation.