chapter5-monitoring #2

Merged
carmen merged 13 commits from chapter5-monitoring into main 2026-11-04 16:38:38 +00:00
2 changed files with 30 additions and 17 deletions
Showing only changes of commit 70c77b6368 - Show all commits

View File

@ -36,7 +36,7 @@ what has been verified.
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.\\
5 & SLI, SLO, and error budget (10) & \StatusPending & Measured short-window results from the incident exercise.\\
6 & Alerts and runbooks (15) & \StatusPending & Notification transport, rule routing, firing/delivery/resolution of both rules, capacity test.\\
6 & Alerts and runbooks (15) & \StatusPending & Deploy Gmail SMTP sender; firing/delivery/resolution of both rules; capacity test.\\
7 & Incident and recovery (10) & \StatusPending & Entire exercise, review, and two owned improvement issues.\\
8 & Manual integration and traceability (10) & \StatusPending & Reviewed final commit and successful automated PDF build links.\\
\end{tabularx}
@ -404,23 +404,36 @@ Root disk below 15\% & Root disk available percentage $< 15$ for 5 minutes. Owne
\end{tabularx}
\StatusPending{} Add a live runbook link to each rule's annotations once the
manual is published, and record the notification grouping and delay settings
actually used.
manual is published.
\subsection{Notification Route}
A contact point named \emph{Chapter 5 owner email} is provisioned with
resolved messages enabled. \StatusPending{} Three gaps remain:
\begin{enumerate}
\item Grafana has no outgoing mail transport, so email cannot be delivered.
The team must either configure the \texttt{[smtp]} settings with credentials
kept outside Git, or switch to an approved team-controlled webhook or chat
integration, which the assignment notes avoids SMTP configuration.
\item The provisioned files neither select this contact point in either rule
nor provision a notification policy that routes to it. Routing must be
configured and confirmed for both rules.
\item The assignment names the contact point \texttt{team-alerts}; rename it
or document the difference.
\end{enumerate}
Both rules send to a single email contact point named \texttt{team-alerts},
with resolved messages enabled. Each rule selects it directly in its
notification settings, so no separate notification policy is needed.
\begin{table}[htbp]\centering\small
\begin{tabular}{lL{8.6cm}}
\toprule Setting & Value and effect\\\midrule
Group by & \texttt{alertname}, \texttt{instance}: Gitea and Jenkins failures notify separately.\\
Group wait & 30 seconds before the first notification for a new group.\\
Group interval & 5 minutes before notifying about changes to a group.\\
Repeat interval & 4 hours before repeating an unresolved notification.\\\bottomrule
\end{tabular}
\caption{Notification grouping and delay settings, provisioned in
\texttt{chapter5-alerts.json}.}
\label{Table:MonitoringNotification}
\end{table}
Grafana OSS needs an outgoing mail service before an email contact point can
send. Grafana sends through Gmail SMTP on port 587 with mandatory STARTTLS.
The host, port, and TLS policy are in \texttt{compose.yaml}. The sender
address and a Gmail App Password are supplied in the host-only file
\path{/home/ubuntu/monitoring/secrets/smtp.env}, which Git ignores; the
repository contains only \path{smtp.env.example} with placeholders.
Changing this file requires recreating the Grafana container with
\texttt{docker compose up -d grafana}; its named volume preserves state.
\StatusPending{} Deploy these files, supply the sender credentials, and record
a successful contact-point test with its receipt time.
\subsection{Firing, Delivery, and Resolution}
\StatusPending{} Send a contact-point test and confirm receipt. Then record

View File

@ -75,6 +75,6 @@ These rows record actual CI account purposes and storage references, not secret
\begin{longtable}{p{0.27\textwidth}p{0.63\textwidth}}
\textbf{Account / credential} & \textbf{Scope and non-secret storage hint}\\\hline
Grafana administrator & Random password in host-only file \path{/home/ubuntu/monitoring/grafana_admin_password}, mode 0600, owned by the Grafana container user, mounted read-only and ignored by Git. Retrieve locally with \texttt{sudo}; never paste it into reports. Default login rejected.\\
Notification destination & Pending: SMTP credential or webhook URL. Must be supplied locally outside Git and redacted from screenshots.\\
Grafana SMTP sender & Gmail account with a Gmail App Password, not the account password. Stored only in host file \path{/home/ubuntu/monitoring/secrets/smtp.env}, mode 0600, ignored by Git. Revoke the App Password in the Google account when the course ends. Redact from screenshots.\\
Prometheus and exporters & No credentials; reachable only on the private monitoring network.\\
\end{longtable}