diff --git a/devopsMonitoring.tex b/devopsMonitoring.tex index 6acc21c..fba00a9 100644 --- a/devopsMonitoring.tex +++ b/devopsMonitoring.tex @@ -33,7 +33,7 @@ what has been verified. \endlastfoot 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.\\ -3 & HTTPS and access control (10) & \StatusPending & Public Grafana hostname; external exposure tests.\\ +3 & HTTPS and access control (10) & \StatusPending & Grafana HTTPS and outside tests recorded (Nov.~3). Close public Grafana \texttt{/metrics}; Caddy excerpt.\\ 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).\\ 6 & Alerts and runbooks (15) & \StatusPass & Both rules fired, emailed, and resolved; receipt confirmed; runbook links live (Nov.~2).\\ @@ -366,7 +366,7 @@ These are whole-host values; they do not describe any single container. \toprule Service & Login URL & Access\\\midrule Gitea & \url{https://git.590hcm.dev/user/login} & Public HTTPS; unchanged.\\ Jenkins & \url{https://ci.590hcm.dev:8443/login} & Approved SSH tunnel only, as in \ChapterRef{JenkinsCI}; host-only probe exception in \autoref{sec:mon-metrics}.\\ -Grafana & \texttt{https://metrics.590hcm.dev/} & \StatusPending{} DNS and Caddy route not yet created.\\\bottomrule +Grafana & \url{https://metrics.590hcm.dev/login} & Public HTTPS through Caddy to private \texttt{grafana:3000}; individual Grafana accounts, no anonymous access.\\\bottomrule \end{tabular} \caption{HTTPS login URLs. No grader account is required; dashboard and alert evidence is embedded in this chapter.} @@ -382,13 +382,42 @@ user (UID 472). The default \texttt{admin:admin} login was rejected in a live API check. Prometheus 9090, Node Exporter 9100, and Blackbox Exporter 9115 are not published on the host. No Gitea or Jenkins metrics endpoint was enabled. -\StatusPending{} Create the \texttt{metrics.590hcm.dev} record at Name.com and -a Caddy route to \texttt{grafana:3000}. Then, from a machine outside -Lightsail, test the Gitea, Jenkins, and Grafana login pages and confirm that -ports 9090, 9100, 9115, and 3000 and any metrics paths are unreachable over -IPv4 (and IPv6 where enabled). Record the source, commands, results, and date -in a table like \autoref{Table:CIExposure}, and include the relevant -sanitized Caddy excerpt. +The \texttt{metrics.590hcm.dev} A record at Name.com points to +\texttt{184.193.0.32}; no AAAA record exists, so IPv6 does not apply. A team +member added the Caddy route to \texttt{grafana:3000}, which reaches Grafana +over the existing \texttt{gitea-deploy\_internal} network. Grafana's +certificate was issued by Let's Encrypt YE1 for \texttt{metrics.590hcm.dev}, +valid from November 3, 2026 at 18:56:05~UTC through February 1, 2027 at +18:56:04~UTC. + +\begin{table}[htbp]\centering\small +\begin{tabular}{L{5.6cm}L{2.0cm}L{4.6cm}} +\toprule Request (\texttt{curl}) & Result & Meaning\\\midrule +\path{http://metrics.590hcm.dev/} & 308 & Redirects to HTTPS.\\ +\path{https://metrics.590hcm.dev/api/health} & 200 & Grafana 13.2.4, database ok; valid TLS.\\ +\path{https://metrics.590hcm.dev/api/search} & 401 & Dashboards require login.\\ +\path{https://git.590hcm.dev/user/login} & 200 & Gitea login public, as intended.\\ +\path{https://ci.590hcm.dev/login} and \path{/} & 403 & Jenkins blocked outside the SSH tunnel.\\ +\path{https://git.590hcm.dev/metrics} & 404 & No Gitea metrics endpoint.\\ +\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.\\ +\path{https://metrics.590hcm.dev/metrics} & \StatusFail{} 200 & Grafana's internal metrics were public.\\\bottomrule +\end{tabular} +\caption{External exposure tests from a team member's Windows computer on a +residential network, outside Lightsail, November 3, 2026, about +21:08~UTC.} +\label{Table:MonitoringExposure} +\end{table} + +The last test found a gap. Grafana serves its own Prometheus-format metrics +at \path{/metrics} without login by default, and the new public route +exposed about 7{,}200 lines of them: version, runtime, and usage counters, +but no credentials or dashboard data. Prometheus does not scrape Grafana, so +nothing depends on this endpoint. The fix sets +\texttt{GF\_METRICS\_ENABLED: "false"} in the Grafana service in +\texttt{compose.yaml}. \StatusPending{} Deploy the fix, recreate Grafana, and +confirm that \path{https://metrics.590hcm.dev/metrics} no longer returns +200. Add the sanitized Caddy excerpt for the Grafana route. \section{Dashboard and CI Correlation} \label{sec:mon-dashboard}