Record Chapter 5 incident, measured SLI, and restart persistence

Add the November 2 Jenkins incident timeline, measured detection and
restoration times, blameless review with owned issues 5 and 6, HTTPS
alert evidence, restart persistence, and the measured SLI window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
carmen-cortese 2026-11-02 11:34:25 -05:00
parent 65eff9cc93
commit 2f3040e3dc
8 changed files with 202 additions and 51 deletions

View File

@ -31,13 +31,13 @@ what has been verified.
\endhead \endhead
\bottomrule \bottomrule
\endlastfoot \endlastfoot
1 & Deployment and reproducibility (15) & \StatusPending & Backup procedure, restart-persistence test.\\ 1 & Deployment and reproducibility (15) & \StatusPending & Restart persistence recorded (Nov.~2). Backup procedure; second verifier.\\
2 & Metrics and probes (15) & \StatusPending & Host comparison and target health recorded (Nov.~1). Team approval and reload time of the Jenkins probe exception.\\ 2 & Metrics and probes (15) & \StatusPending & Host comparison and target health recorded (Nov.~1). Team approval and reload time of the Jenkins probe exception.\\
3 & HTTPS and access control (10) & \StatusPending & Public Grafana hostname; external exposure tests.\\ 3 & HTTPS and access control (10) & \StatusPending & Public Grafana hostname; external exposure tests.\\
4 & Dashboard and CI correlation (15) & \StatusPending & Dashboard screenshot recorded (Nov.~1). Normal-build before/during/after comparison.\\ 4 & Dashboard and CI correlation (15) & \StatusPending & Dashboard screenshot recorded (Nov.~1). Normal-build before/during/after comparison.\\
5 & SLI, SLO, and error budget (10) & \StatusPending & Measured short-window results from the incident exercise.\\ 5 & SLI, SLO, and error budget (10) & \StatusPass & Definitions, worked example, and measured incident window (Nov.~2).\\
6 & Alerts and runbooks (15) & \StatusPending & Capacity rule fired, emailed, and resolved (Nov.~1). HTTPS rule awaits the incident; recipient receipt confirmation.\\ 6 & Alerts and runbooks (15) & \StatusPending & Both rules fired, emailed, and resolved; receipt confirmed. Live runbook link in rule annotations.\\
7 & Incident and recovery (10) & \StatusPending & Entire exercise, review, and two owned improvement issues.\\ 7 & Incident and recovery (10) & \StatusPending & Exercise, timeline, and review recorded (Nov.~2). Owned issues 5 and 6 opened. Passing pipeline check.\\
8 & Manual integration and traceability (10) & \StatusPending & Reviewed final commit and successful automated PDF build links.\\ 8 & Manual integration and traceability (10) & \StatusPending & Reviewed final commit and successful automated PDF build links.\\
\end{tabularx} \end{tabularx}
@ -154,12 +154,26 @@ Grafana runtime state cannot. \StatusPending{} Document the backup procedure
for the two named volumes and the rollback compatibility check. for the two named volumes and the rollback compatibility check.
\subsection{Restart Persistence} \subsection{Restart Persistence}
\StatusPending{} Restart Prometheus and Grafana separately without deleting \StatusPass{} After the incident on November 2, Prometheus was restarted at
volumes. Record the restart times, then verify that earlier time-series 16:03:58~UTC and Grafana at 16:05:12~UTC with \texttt{docker compose restart},
history, the dashboard, the data source, and both alert rules remain, and one at a time and without removing volumes
record any collection gap. A restart test shows persistence, not a successful (\autoref{Figure:MonitoringRestart}). Afterward the dashboard loaded through
the provisioned Prometheus data source and still showed the earlier hour,
including the Jenkins outage at 15:48--15:52~UTC
(\autoref{Figure:MonitoringIncidentDashboard}). The HTTPS rule's state
history, including October 30 entries, was still present after the Grafana
restart (\autoref{Figure:MonitoringIncidentHistory}). No collection gap is
visible at the dashboard's resolution; a gap shorter than one 30-second
scrape could still exist. A restart test shows persistence, not a successful
backup restore. backup restore.
\begin{figure}[htbp]\centering
\includegraphics[width=0.85\linewidth]{prism-uploads/ch5-restart-persistence.png}
\caption{Separate Prometheus and Grafana restarts with UTC timestamps,
November 2, 2026.}
\label{Figure:MonitoringRestart}
\end{figure}
\section{Metrics and Probes} \section{Metrics and Probes}
\label{sec:mon-metrics} \label{sec:mon-metrics}
@ -420,19 +434,49 @@ permits: $0.01 \times 2880 = 28.8$ failed samples, or $28.8 \times 30\,\text{s}
minutes. Because samples are whole, at most 28 failures would meet the target. minutes. Because samples are whole, at most 28 failures would meet the target.
\subsection{Measured Exercise Window} \subsection{Measured Exercise Window}
\StatusPending{} After the controlled incident, record the exact window start \StatusPass{} The measured window is the ten minutes from 15:45:00 to
and end, time zone, scrape interval, and query evaluation time. Report both 15:55:00~UTC on November 2, 2026, which contains the whole Jenkins incident
services with (\autoref{sec:mon-incident}). The scrape interval for the \texttt{https} job
is 30 seconds. Both queries were run as instant queries in Grafana Explore,
fixed to the window end with the \texttt{@} modifier, so the evaluation time
does not depend on when they were run:
\begin{verbatim} \begin{verbatim}
100 * avg_over_time(probe_success{job="https", 100 * avg_over_time(probe_success{job="https"}[10m] @ 1793634900)
instance="https://ci.590hcm.dev/login"}[10m]) count_over_time(probe_success{job="https"}[10m] @ 1793634900)
count_over_time(probe_success{job="https",
instance="https://ci.590hcm.dev/login"}[10m])
\end{verbatim} \end{verbatim}
and the equivalent Gitea queries. Compare the received count with about 20 Here \texttt{1793634900} is 15:55:00~UTC on November 2, 2026.
expected samples. Missing samples are unknown and are not counted as
successes. A short window cannot establish the 24-hour SLO; full-day \begin{table}[htbp]\centering\small
evaluation is optional. \begin{tabular}{L{2.2cm}L{2.0cm}L{2.0cm}L{2.0cm}L{4.0cm}}
\toprule Service & Samples received & Successes & Failures & SLI (success \%)\\\midrule
Gitea & 20 of 20 & 20 & 0 & 100\%\\
Jenkins & 20 of 20 & 11 & 9 & 55\%\\\bottomrule
\end{tabular}
\caption{Measured SLI for 15:45--15:55~UTC, November 2, 2026. Successes are
the SLI multiplied by the received count.}
\label{Table:MonitoringMeasuredSLI}
\end{table}
All 20 expected samples arrived for both services, so no sample is unknown.
Nine failed Jenkins samples at 30-second spacing equal 4.5 minutes, which
matches the measured restoration time of 4~min 18~s to 4~min 48~s
(\autoref{Table:MonitoringIncidentMeasures}).
The 55\% value describes only this ten-minute window, which was chosen
because it contains the outage; it does not measure the 24-hour SLO. For
comparison only: the daily error budget at 99\% is 28.8 failed samples
(\autoref{sec:mon-slo}), so these 9 failures would use about 31\% of one
day's budget. If every other Jenkins sample that day succeeded, the day would
end at $2871/2880 = 99.69\%$, above the target. That is a hypothetical
projection, not a measured full-day result.
\begin{figure}[htbp]\centering
\includegraphics[width=0.8\linewidth]{prism-uploads/ch5-sli-avg.png}\\[4pt]
\includegraphics[width=0.8\linewidth]{prism-uploads/ch5-sli-count.png}
\caption{Instant queries for the measured window: success percentage (top)
and received sample count (bottom).}
\label{Figure:MonitoringMeasuredSLI}
\end{figure}
\section{Alerts and Runbooks} \section{Alerts and Runbooks}
\label{sec:mon-alerts} \label{sec:mon-alerts}
@ -526,9 +570,9 @@ Resolved email sent & 21:34 & \texttt{[RESOLVED] Root disk space below 15 percen
The firing email followed the firing state within the 30-second group wait, The firing email followed the firing state within the 30-second group wait,
and the resolved email followed recovery within the same minute. The final and the resolved email followed recovery within the same minute. The final
provisioned setting is the original 15\% threshold. \StatusPending{} Record provisioned setting is the original 15\% threshold. The send times above
the recipient's confirmation of receipt; the evidence above is from the come from the sender's mailbox; the recipient later confirmed receipt of
sender's mailbox. both emails.
\begin{figure}[htbp]\centering \begin{figure}[htbp]\centering
\includegraphics[width=0.8\linewidth]{prism-uploads/ch5-disk-alert-firing.png} \includegraphics[width=0.8\linewidth]{prism-uploads/ch5-disk-alert-firing.png}
@ -545,17 +589,21 @@ Normal 16:34:40 Eastern Standard Time (21:26:10, 21:31:10, and 21:34:40 UTC).}
\label{Figure:MonitoringDiskHistory} \label{Figure:MonitoringDiskHistory}
\end{figure} \end{figure}
\paragraph{HTTPS rule.} \StatusPending{} Record firing, delivery, and \paragraph{HTTPS rule (passed).} During the controlled Jenkins incident on
resolution for the HTTPS availability rule during the controlled Jenkins November 2, the HTTPS rule went Pending at 15:48:15, fired at 15:49:15, and
incident in \autoref{sec:mon-incident}. Redact destination secrets sent its firing email in the 15:49 minute. It returned to Normal at 15:52:45
from screenshots. and sent the resolved email at 15:54~UTC. Only the Jenkins instance fired;
Gitea stayed Normal. The recipient confirmed receipt of both emails for each
rule. Full timings are in \autoref{sec:mon-incident}
(\autoref{Table:MonitoringIncident}).
\section{Incident and Recovery} \section{Incident and Recovery}
\label{sec:mon-incident} \label{sec:mon-incident}
\StatusPending{} The controlled Jenkins incident has not been run. The Jenkins \StatusPass{} The controlled Jenkins incident ran on November 2, 2026,
probe now succeeds; the exercise still depends on working notifications, so from 15:46 to 15:54~UTC. Only the Jenkins controller was stopped; Gitea,
the alert can be delivered and resolved. the Jenkins agent, and monitoring stayed up. The alert recipient confirmed
receipt of both notifications.
\subsection{Exercise Plan} \subsection{Exercise Plan}
Agree on a maintenance window with the team and name who restarts Jenkins. Agree on a maintenance window with the team and name who restarts Jenkins.
@ -567,29 +615,91 @@ agreed duration or affects other work. Do not remove volumes or stop the
instance. instance.
\subsection{Timeline and Measured Times} \subsection{Timeline and Measured Times}
The stop and restart used \texttt{docker stop jenkins} and
\texttt{docker start jenkins} on the host. Each command was preceded and
followed by a UTC timestamp appended to the host file
\path{~/ch5-incident.log} (\autoref{Figure:MonitoringIncidentLog}).
\begin{table}[htbp]\centering\small \begin{table}[htbp]\centering\small
\begin{tabular}{lll} \begin{tabular}{L{3.6cm}L{2.6cm}L{6.2cm}}
\toprule Event & Time (UTC) & Source\\\midrule \toprule Event & Time (UTC) & Source\\\midrule
Jenkins stopped & \StatusPending & incident record\\ Pre-check & 15:46:25 & Incident log; Jenkins availability 1.\\
First failing probe & \StatusPending & Prometheus\\ Stop issued & 15:47:52 & Incident log.\\
Alert firing & \StatusPending & Grafana\\ Jenkins stopped & 15:47:57 & Incident log, after \texttt{docker stop} returned.\\
Notification received & \StatusPending & destination\\ First failing probe & by 15:48:15 & Rule state history: Pending.\\
Acknowledged & \StatusPending & incident record\\ Alert firing & 15:49:15 & Rule state history: Alerting, after the one-minute pending period.\\
Jenkins restarted & \StatusPending & incident record\\ Notification sent & 15:49 & Sender mailbox, \texttt{[FIRING:1] HTTPS service unavailable}.\\
First successful probe & \StatusPending & Prometheus\\ Notification received & confirmed & Recipient confirmed receipt; exact time not recorded.\\
Resolved notification & \StatusPending & destination\\\bottomrule Jenkins restart issued & 15:51:39 & Incident log.\\
Jenkins container started & 15:51:40 & Incident log.\\
First successful probe & 15:52:15--15:52:45 & Dashboard still 0 at 15:52:15; rule Normal at 15:52:45.\\
Alert resolved & 15:52:45 & Rule state history: Normal.\\
Resolved notification sent & 15:54 & Sender mailbox, \texttt{[RESOLVED]}.\\\bottomrule
\end{tabular} \end{tabular}
\caption{Incident timeline. Detection time runs from the stop to the \caption{Incident timeline, November 2, 2026. Screens displayed Eastern
notification; restoration time runs from the stop to the first successful Standard Time; times are converted to UTC.}
probe. Compare both with the configured scrape, evaluation, and pending
intervals.}
\label{Table:MonitoringIncident} \label{Table:MonitoringIncident}
\end{table} \end{table}
\begin{table}[htbp]\centering\small
\begin{tabular}{L{4.4cm}L{2.4cm}L{5.6cm}}
\toprule Measure & Value & Explanation\\\midrule
Planned outage & 3 min 43 s & Container stopped 15:47:57, started 15:51:40.\\
Time to first failing check & $\le$ 18 s & Stop to Pending; bounded by the 30-second rule evaluation.\\
Time to firing & 78 s & Stop to Alerting: about one evaluation plus the one-minute pending period.\\
Detection (stop to notification) & about 1.5 min & Email sent in the 15:49 minute, after the 15:49:15 firing.\\
Restoration (stop to first success) & 4 min 18 s -- 4 min 48 s & Includes about one minute of Jenkins startup after the container started.\\
Restart to recovery & $\le$ 65 s & 15:51:40 to 15:52:45.\\
Recovery to resolved email & about 1--2 min & Within the five-minute group interval.\\\bottomrule
\end{tabular}
\caption{Measured detection and restoration times. Precision is limited by
the 30-second evaluation interval and minute-level email timestamps.}
\label{Table:MonitoringIncidentMeasures}
\end{table}
\begin{figure}[htbp]\centering
\includegraphics[width=0.6\linewidth]{prism-uploads/ch5-incident-log.png}
\caption{Host incident log with UTC timestamps for the stop and restart.}
\label{Figure:MonitoringIncidentLog}
\end{figure}
\begin{figure}[htbp]\centering
\includegraphics[width=0.75\linewidth]{prism-uploads/ch5-incident-firing.png}
\caption{During the incident: the HTTPS rule fires for the Jenkins instance
only, while Gitea stays Normal. Times are EST (UTC$-5$).}
\label{Figure:MonitoringIncidentFiring}
\end{figure}
\begin{figure}[htbp]\centering
\includegraphics[width=0.75\linewidth]{prism-uploads/ch5-incident-history.png}
\caption{HTTPS rule state history for the Jenkins instance, read after the
Grafana restart: Pending 10:48:15, Alerting 10:49:15, Normal 10:52:45 EST on
November 2. The October 30 entries come from setup, when the Jenkins login
returned HTTP 403 before the probe exception, and are not part of this
exercise.}
\label{Figure:MonitoringIncidentHistory}
\end{figure}
\subsection{Recovery Checks} \subsection{Recovery Checks}
\StatusPending{} After recovery, verify Jenkins HTTPS and a passing pipeline, After recovery, Jenkins HTTPS availability returned to 1 and stayed there,
Gitea and its webhook and commit-status integration, and the manual PDF build. and Gitea availability stayed at 1 throughout
Include outage graphs from the dashboard. (\autoref{Figure:MonitoringIncidentDashboard}). The dashboard also shows the
cost of a Jenkins start on this host: available memory rose by about
150~MiB while Jenkins was stopped, then fell to about 600~MiB, the lowest
value in the hour, during startup. CPU rose to about 10\%, and the Jenkins
probe took about 2.3~seconds while Jenkins was still starting.
\begin{figure}[htbp]\centering
\includegraphics[width=\linewidth]{prism-uploads/ch5-incident-dashboard.png}
\caption{Dashboard after the incident and the monitoring restarts, 10:06 to
11:06 EST (15:06--16:06 UTC). The Jenkins outage is visible at about
10:48--10:52 EST.}
\label{Figure:MonitoringIncidentDashboard}
\end{figure}
\StatusPending{} Run one pricing-app pipeline on \texttt{main} and record the
build number, commit, agent, start and end times, and result. Confirm the
Gitea webhook and commit status, and record the manual PDF build.
\subsection{Difference from the Chapter 4 Failure} \subsection{Difference from the Chapter 4 Failure}
The Chapter 4 exercise changed application code so a test failed while The Chapter 4 exercise changed application code so a test failed while
@ -598,12 +708,53 @@ removes the Jenkins service itself while the code stays correct. The first is
caught by the merge gate; the second is caught by monitoring and alerting. caught by the merge gate; the second is caught by monitoring and alerting.
\subsection{Blameless Review} \subsection{Blameless Review}
\StatusPending{} Record impact, timeline, evidence, cause, response, and This review describes what happened and what the system showed. It does not
measurement gaps. Create two prioritized improvement issues in Gitea with assign blame.
owners, and link them here. The review must state the shared failure domain:
monitoring runs on the same Lightsail instance as Gitea and Jenkins, so an \paragraph{Impact.} Jenkins could not be reached over HTTPS for about four
instance outage would also stop collection and notifications. An independent and a half minutes on November 2, from 15:47:57 to about 15:52:30~UTC. No
external check should be proposed as one improvement. build was running, so no build was lost. Gitea, its repositories, and
monitoring were not affected.
\paragraph{Cause.} A planned stop of the Jenkins controller container for
this exercise. The code and configuration did not change.
\paragraph{Response.} The probe failure was visible within one evaluation,
the alert fired after the configured one-minute pending period, and the email
went out in the same minute. Jenkins was restarted after about 3 minutes 43
seconds, as planned. The alert resolved automatically, and the resolved email
followed within the five-minute group interval.
\paragraph{What went well.} The alert separated the two services: only the
Jenkins instance fired, and Gitea stayed Normal. No manual step was needed
to send or resolve the notification. The incident log, rule history, and
email timestamps agree with one another.
\paragraph{Measurement gaps.} Rule state times are rounded to the 30-second
evaluation interval, and the email times are rounded to the minute. The
acknowledgement time was not written down; only receipt was confirmed. The
exact first successful probe is known only to a 30-second window.
\paragraph{Shared failure domain.} Prometheus, Grafana, and the exporters run
on the same Lightsail instance as Gitea and Jenkins. If the instance itself
fails, collection and notification stop with it, and no alert would be sent.
This exercise tested a single service, not the whole host.
\paragraph{Follow-up issues.}
\begin{enumerate}
\item \textbf{High: add an independent external uptime check} for the Gitea
and Jenkins login pages from outside Lightsail, with notification to the
team, so a whole-host outage is still detected. Tracked as
\href{https://git.590hcm.dev/SSW590Team/pricing-app/issues/5}{pricing-app
issue 5}; owner \texttt{carmen}.
\item \textbf{Medium: protect memory headroom.} Jenkins startup lowered
available memory to about 600~MiB while about 800~MiB of swap was already in
use. Watch available memory during builds, consider container memory limits,
and resize the instance if builds slow down. Tracked as
\href{https://git.590hcm.dev/SSW590Team/pricing-app/issues/6}{pricing-app
issue 6}; owner \texttt{max}.
\end{enumerate}
Both issues were opened on November 2 and assigned in Gitea.
\section{Manual Integration and Traceability} \section{Manual Integration and Traceability}
\label{sec:mon-manual} \label{sec:mon-manual}

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB