diff --git a/devopsMonitoring.tex b/devopsMonitoring.tex index 7d778c4..9750fcc 100644 --- a/devopsMonitoring.tex +++ b/devopsMonitoring.tex @@ -32,9 +32,9 @@ what has been verified. \bottomrule \endlastfoot 1 & Deployment and reproducibility (15) & \StatusPending & Backup procedure, restart-persistence test.\\ -2 & Metrics and probes (15) & \StatusPending & Recorded \texttt{free -b} and \texttt{df -B1 /} comparison; target-health screenshot.\\ +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.\\ -4 & Dashboard and CI correlation (15) & \StatusPending & Normal-build before/during/after comparison; dashboard screenshots.\\ +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.\\ 6 & Alerts and runbooks (15) & \StatusPending & Capacity rule fired, emailed, and resolved (Nov.~1). HTTPS rule awaits the incident; recipient receipt confirmation.\\ 7 & Incident and recovery (10) & \StatusPending & Entire exercise, review, and two owned improvement issues.\\ @@ -185,8 +185,17 @@ On October 30, Prometheus reported all five configured scrape targets up: Prometheus itself, Node Exporter, Blackbox Exporter, and the two probe targets. For the probe targets, \texttt{up=1} means Blackbox Exporter was scraped; it does not mean the HTTPS request succeeded. -\StatusPending{} Add a labeled screenshot of the target view or an -\texttt{up} query in Grafana Explore. +\StatusPass{} On November 1 at 21:55:25~UTC, an \texttt{up} query in +Grafana Explore returned five series, one per target, and the graph shows +all five at 1 for the previous hour (\autoref{Figure:MonitoringTargetHealth}). + +\begin{figure}[htbp]\centering +\includegraphics[width=0.85\linewidth]{prism-uploads/ch5-target-health.png} +\caption{\texttt{up} for all five scrape targets in Grafana Explore, +November 1, 2026. Times are Eastern Standard Time (UTC$-5$); 16:55:25 EST +is 21:55:25 UTC.} +\label{Figure:MonitoringTargetHealth} +\end{figure} \subsection{Probe Success Criteria} The \texttt{http\_2xx} module sends an IPv4 \texttt{GET} with a 10-second @@ -269,10 +278,37 @@ was reloaded with it. \subsection{Host Verification} The root filesystem labels \texttt{/dev/root}, \texttt{ext4}, and \texttt{/} -were confirmed from the exported series. \StatusPending{} Record a side-by-side -comparison, at nearby timestamps, of \path{node_memory_MemTotal_bytes} and -\path{node_memory_MemAvailable_bytes} with \texttt{free -b}, and of the root -filesystem size and available bytes with \texttt{df -B1 /}. +were confirmed from the exported series. \StatusPass{} On November 1 at +21:49:23~UTC, \texttt{free -b} and \texttt{df -B1 /} ran on the host, and +Prometheus was queried for the matching Node Exporter series within the +next second (sample timestamps 21:49:23.890 to 21:49:24.481~UTC), in one +command from \path{/home/ubuntu/monitoring}. + +\begin{table}[htbp]\centering\small +\begin{tabular}{L{3.0cm}L{2.6cm}L{4.2cm}L{2.8cm}} +\toprule Quantity & Host command (bytes) & Prometheus series (bytes) & Difference\\\midrule +Total memory & 1{,}998{,}614{,}528 & \path{node_memory_MemTotal_bytes} 1{,}998{,}614{,}528 & exact\\ +Available memory & 839{,}430{,}144 & \path{node_memory_MemAvailable_bytes} 841{,}371{,}648 & 1.85~MiB (0.23\%)\\ +Root filesystem size & 61{,}285{,}326{,}848 & \path{node_filesystem_size_bytes} 61{,}285{,}326{,}848 & exact\\ +Root available & 41{,}715{,}208{,}192 & \path{node_filesystem_avail_bytes} 41{,}715{,}216{,}384 & 8{,}192 (two 4~KiB blocks)\\\bottomrule +\end{tabular} +\caption{Host verification on November 1, 2026. The filesystem series use +\texttt{device="/dev/root"}.} +\label{Table:MonitoringHostVerification} +\end{table} + +Fixed sizes match exactly. Available memory and free space change from +moment to moment, so small differences are expected when the samples are +taken about one second apart. At the same time, 838{,}422{,}528 bytes +(about 800~MiB) of swap were in use and the root filesystem was 32\% used. +These are whole-host values; they do not describe any single container. + +\begin{figure}[htbp]\centering +\includegraphics[width=0.9\linewidth]{prism-uploads/ch5-host-verification.png} +\caption{Host commands and Prometheus queries run together on November 1, +2026, 21:49:23~UTC.} +\label{Figure:MonitoringHostVerification} +\end{figure} \section{HTTPS and Access Control} \label{sec:mon-access} @@ -333,8 +369,25 @@ Jenkins availability & 0/1 & {\footnotesize\path{probe_success{job="https",insta HTTPS probe duration & seconds & {\footnotesize\path{probe_duration_seconds{job="https",instance=~"https://(git|ci)[.]590hcm[.]dev/.*"}}}, one labeled line per service.\\ \end{tabularx} -\StatusPending{} Add labeled screenshots of all six panels. Then capture host -metrics before, during, and after one normal run of the existing Jenkins +\autoref{Figure:MonitoringDashboard} shows all six panels for the hour +ending about 21:56~UTC on November 1. CPU stayed below about 10\%, root disk +stayed at 68.1\% available, and both HTTPS availability panels stayed at 1. +Probe durations were mostly 10--25~ms, with short spikes up to about 115~ms. +Available memory rose by roughly 100~MiB at about 21:26 and 21:34~UTC; both +times match the Grafana restarts during the capacity alert test +(\autoref{Table:MonitoringDiskAlertTest}). Memory then fell back toward +650~MiB as Grafana warmed up, so the restarts briefly freed memory but did +not change the host's limited headroom. + +\begin{figure}[htbp]\centering +\includegraphics[width=\linewidth]{prism-uploads/ch5-dashboard.png} +\caption{Chapter 5 dashboard, last hour, November 1, 2026 (15:56--16:56 +EST, 20:56--21:56 UTC). The tooltip on the disk panel shows 68.1\% +available.} +\label{Figure:MonitoringDashboard} +\end{figure} + +\StatusPending{} Capture host metrics before, during, and after one normal run of the existing Jenkins pipeline, annotated with the build ID, commit, start and end times, and execution location. Builds run on the Python agent container on the same host (\ChapterRef{JenkinsCI}), so any change appears in whole-host metrics. @@ -437,6 +490,14 @@ and Grafana was recreated. A contact-point test was sent from the \texttt{team-alerts} view; the rule test below confirms end-to-end delivery through the same route. +\begin{figure}[htbp]\centering +\includegraphics[width=0.8\linewidth]{prism-uploads/ch5-team-alerts-contact.png} +\caption{The provisioned \texttt{team-alerts} email contact point: read-only +in the UI, single email, resolved messages enabled. SMTP credentials are not +shown in Grafana.} +\label{Figure:MonitoringContactPoint} +\end{figure} + \subsection{Firing, Delivery, and Resolution} \paragraph{Capacity rule (passed).} The disk rule was tested safely on November 1 without filling the disk. The provisioned file was copied to a @@ -469,6 +530,21 @@ provisioned setting is the original 15\% threshold. \StatusPending{} Record the recipient's confirmation of receipt; the evidence above is from the sender's mailbox. +\begin{figure}[htbp]\centering +\includegraphics[width=0.8\linewidth]{prism-uploads/ch5-disk-alert-firing.png} +\caption{Disk rule firing during the test on November 1, 2026, with the +temporary threshold ``Is below 90'' and about 68.07\% free. Graph times are +Eastern Standard Time (UTC$-5$).} +\label{Figure:MonitoringDiskFiring} +\end{figure} + +\begin{figure}[htbp]\centering +\includegraphics[width=0.8\linewidth]{prism-uploads/ch5-disk-alert-history.png} +\caption{Disk rule state history: Pending 16:26:10, Alerting 16:31:10, and +Normal 16:34:40 Eastern Standard Time (21:26:10, 21:31:10, and 21:34:40 UTC).} +\label{Figure:MonitoringDiskHistory} +\end{figure} + \paragraph{HTTPS rule.} \StatusPending{} Record firing, delivery, and resolution for the HTTPS availability rule during the controlled Jenkins incident in \autoref{sec:mon-incident}. Redact destination secrets diff --git a/prism-uploads/ch5-dashboard.png b/prism-uploads/ch5-dashboard.png new file mode 100644 index 0000000..8892936 Binary files /dev/null and b/prism-uploads/ch5-dashboard.png differ diff --git a/prism-uploads/ch5-disk-alert-firing.png b/prism-uploads/ch5-disk-alert-firing.png new file mode 100644 index 0000000..15b9367 Binary files /dev/null and b/prism-uploads/ch5-disk-alert-firing.png differ diff --git a/prism-uploads/ch5-disk-alert-history.png b/prism-uploads/ch5-disk-alert-history.png new file mode 100644 index 0000000..2dafd89 Binary files /dev/null and b/prism-uploads/ch5-disk-alert-history.png differ diff --git a/prism-uploads/ch5-host-verification.png b/prism-uploads/ch5-host-verification.png new file mode 100644 index 0000000..24528af Binary files /dev/null and b/prism-uploads/ch5-host-verification.png differ diff --git a/prism-uploads/ch5-target-health.png b/prism-uploads/ch5-target-health.png new file mode 100644 index 0000000..03935cf Binary files /dev/null and b/prism-uploads/ch5-target-health.png differ diff --git a/prism-uploads/ch5-team-alerts-contact.png b/prism-uploads/ch5-team-alerts-contact.png new file mode 100644 index 0000000..482134e Binary files /dev/null and b/prism-uploads/ch5-team-alerts-contact.png differ