chapter5-monitoring #2

Merged
carmen merged 13 commits from chapter5-monitoring into main 2026-11-04 16:38:38 +00:00
Showing only changes of commit 7076fd447b - Show all commits

View File

@ -32,8 +32,8 @@ what has been verified.
\bottomrule \bottomrule
\endlastfoot \endlastfoot
1 & Deployment and reproducibility (15) & \StatusPending & Restart persistence and backup recorded (Nov.~2). Second team member's verification.\\ 1 & Deployment and reproducibility (15) & \StatusPending & Restart persistence and backup recorded (Nov.~2). Second team member's verification.\\
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) & \StatusPass & Host comparison and target health recorded (Nov.~1); Jenkins probe exception approved (Nov.~4).\\
3 & HTTPS and access control (10) & \StatusPending & Grafana HTTPS and outside tests recorded (Nov.~3). Close public Grafana \texttt{/metrics}; Caddy excerpt.\\ 3 & HTTPS and access control (10) & \StatusPass & Grafana HTTPS, Caddy route, and outside tests recorded; public Grafana \texttt{/metrics} closed (Nov.~4).\\
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) & \StatusPass & Definitions, worked example, and measured incident window (Nov.~2).\\ 5 & SLI, SLO, and error budget (10) & \StatusPass & Definitions, worked example, and measured incident window (Nov.~2).\\
6 & Alerts and runbooks (15) & \StatusPass & Both rules fired, emailed, and resolved; receipt confirmed; runbook links live (Nov.~2).\\ 6 & Alerts and runbooks (15) & \StatusPass & Both rules fired, emailed, and resolved; receipt confirmed; runbook links live (Nov.~2).\\
@ -176,10 +176,10 @@ the upgraded volume.
(\autoref{Figure:MonitoringBackup}): \path{prometheus_data-20261102T1639Z.tgz} (\autoref{Figure:MonitoringBackup}): \path{prometheus_data-20261102T1639Z.tgz}
(12~MB) and \path{grafana_data-20261102T1639Z.tgz} (163~MB). Each service was (12~MB) and \path{grafana_data-20261102T1639Z.tgz} (163~MB). Each service was
down for a few seconds, and both returned to running; Grafana logged its down for a few seconds, and both returned to running; Grafana logged its
startup at 16:40:27~UTC. \StatusPending{} The archives are on the same host, startup at 16:40:27~UTC. Because the Grafana archive contains its database,
so they do not survive loss of the instance; copy them off the host, and both archives were restricted to mode 0600 on November 4. \StatusPending{}
restrict them to mode 0600 because the Grafana archive contains its database. The archives are on the same host, so they do not survive loss of the
A restore has not been tested. instance; copy them off the host. A restore has not been tested.
\begin{figure}[htbp]\centering \begin{figure}[htbp]\centering
\includegraphics[width=0.8\linewidth]{prism-uploads/ch5-backup.png} \includegraphics[width=0.8\linewidth]{prism-uploads/ch5-backup.png}
@ -304,8 +304,12 @@ container on the host, not only Blackbox Exporter, can load the Jenkins login
page. Only \texttt{GET /login} matches; the sign-in form submits a page. Only \texttt{GET /login} matches; the sign-in form submits a
\texttt{POST} to a different path, which the exception does not match, so it \texttt{POST} to a different path, which the exception does not match, so it
cannot be used to authenticate. This is an intentional change to the Chapter 4 access boundary. cannot be used to authenticate. This is an intentional change to the Chapter 4 access boundary.
\StatusPending{} Record the team's approval of the exception and when Caddy \StatusPass{} Caddy was reloaded with the exception on November 1, before
was reloaded with it. the first successful Jenkins probe at 18:14:58~UTC; the exact reload time was
not recorded. The previous file is kept as
\path{/home/ubuntu/gitea-deploy/Caddyfile.pre-ch5} for rollback. The
teammate who owns the Chapter 4 access policy reviewed and approved the
exception on November 4.
\subsection{Metric Inventory} \subsection{Metric Inventory}
\begin{tabularx}{\linewidth}{L{3.3cm}L{1.3cm}L{1.2cm}Y} \begin{tabularx}{\linewidth}{L{3.3cm}L{1.3cm}L{1.2cm}Y}
@ -401,7 +405,8 @@ valid from November 3, 2026 at 18:56:05~UTC through February 1, 2027 at
\path{https://git.590hcm.dev/metrics} & 404 & No Gitea metrics endpoint.\\ \path{https://git.590hcm.dev/metrics} & 404 & No Gitea metrics endpoint.\\
\path{https://ci.590hcm.dev/prometheus} & 403 & No Jenkins metrics path reachable.\\ \path{https://ci.590hcm.dev/prometheus} & 403 & No Jenkins metrics path reachable.\\
\texttt{184.193.0.32} ports 3000, 9090, 9100, 9115, 8080 & timeout & Not published; blocked by the firewall.\\ \texttt{184.193.0.32} ports 3000, 9090, 9100, 9115, 8080 & timeout & Not published; blocked by the firewall.\\
\path{https://metrics.590hcm.dev/metrics} & \StatusFail{} 200 & Grafana's internal metrics were public.\\\bottomrule \path{https://metrics.590hcm.dev/metrics} & \StatusFail{} 200 & Grafana's internal metrics were public (November 3).\\
Same, after the fix (November 4, 15:41~UTC) & \StatusPass{} 302 & Redirects to the login page; no metrics returned.\\\bottomrule
\end{tabular} \end{tabular}
\caption{External exposure tests from a team member's Windows computer on a \caption{External exposure tests from a team member's Windows computer on a
residential network, outside Lightsail, November 3, 2026, about residential network, outside Lightsail, November 3, 2026, about
@ -415,9 +420,18 @@ exposed about 7{,}200 lines of them: version, runtime, and usage counters,
but no credentials or dashboard data. Prometheus does not scrape Grafana, so but no credentials or dashboard data. Prometheus does not scrape Grafana, so
nothing depends on this endpoint. The fix sets nothing depends on this endpoint. The fix sets
\texttt{GF\_METRICS\_ENABLED: "false"} in the Grafana service in \texttt{GF\_METRICS\_ENABLED: "false"} in the Grafana service in
\texttt{compose.yaml}. \StatusPending{} Deploy the fix, recreate Grafana, and \texttt{compose.yaml} (pricing-app commit be6829f). It was deployed on
confirm that \path{https://metrics.590hcm.dev/metrics} no longer returns November 4 by recreating Grafana with \texttt{docker compose up -d grafana}.
200. Add the sanitized Caddy excerpt for the Grafana route. The same outside request then returned 302 to the login page and no metrics.
The Grafana route in \path{/home/ubuntu/gitea-deploy/Caddyfile} (lines
24--26) contains no secrets and is shown unchanged. Caddy obtains and renews
the certificate automatically and redirects HTTP to HTTPS:
\begin{verbatim}
metrics.590hcm.dev {
reverse_proxy grafana:3000
}
\end{verbatim}
\section{Dashboard and CI Correlation} \section{Dashboard and CI Correlation}
\label{sec:mon-dashboard} \label{sec:mon-dashboard}