Document Chapter 5 alert routing and Gmail SMTP sender

Both alert rules route to the team-alerts email contact point. Add the
notification grouping and delay settings, describe the Gmail SMTP
sender with host-only credentials, and record the App Password storage
hint in the Passwords table. Delivery testing remains pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
carmen-cortese 2026-11-01 13:59:20 -05:00
parent 546ccea891
commit 70c77b6368
2 changed files with 30 additions and 17 deletions

View File

@ -36,7 +36,7 @@ what has been verified.
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 & Normal-build before/during/after comparison; dashboard screenshots.\\ 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.\\ 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.\\ 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.\\ 8 & Manual integration and traceability (10) & \StatusPending & Reviewed final commit and successful automated PDF build links.\\
\end{tabularx} \end{tabularx}
@ -404,23 +404,36 @@ Root disk below 15\% & Root disk available percentage $< 15$ for 5 minutes. Owne
\end{tabularx} \end{tabularx}
\StatusPending{} Add a live runbook link to each rule's annotations once the \StatusPending{} Add a live runbook link to each rule's annotations once the
manual is published, and record the notification grouping and delay settings manual is published.
actually used.
\subsection{Notification Route} \subsection{Notification Route}
A contact point named \emph{Chapter 5 owner email} is provisioned with Both rules send to a single email contact point named \texttt{team-alerts},
resolved messages enabled. \StatusPending{} Three gaps remain: with resolved messages enabled. Each rule selects it directly in its
\begin{enumerate} notification settings, so no separate notification policy is needed.
\item Grafana has no outgoing mail transport, so email cannot be delivered.
The team must either configure the \texttt{[smtp]} settings with credentials \begin{table}[htbp]\centering\small
kept outside Git, or switch to an approved team-controlled webhook or chat \begin{tabular}{lL{8.6cm}}
integration, which the assignment notes avoids SMTP configuration. \toprule Setting & Value and effect\\\midrule
\item The provisioned files neither select this contact point in either rule Group by & \texttt{alertname}, \texttt{instance}: Gitea and Jenkins failures notify separately.\\
nor provision a notification policy that routes to it. Routing must be Group wait & 30 seconds before the first notification for a new group.\\
configured and confirmed for both rules. Group interval & 5 minutes before notifying about changes to a group.\\
\item The assignment names the contact point \texttt{team-alerts}; rename it Repeat interval & 4 hours before repeating an unresolved notification.\\\bottomrule
or document the difference. \end{tabular}
\end{enumerate} \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} \subsection{Firing, Delivery, and Resolution}
\StatusPending{} Send a contact-point test and confirm receipt. Then record \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}} \begin{longtable}{p{0.27\textwidth}p{0.63\textwidth}}
\textbf{Account / credential} & \textbf{Scope and non-secret storage hint}\\\hline \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.\\ 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.\\ Prometheus and exporters & No credentials; reachable only on the private monitoring network.\\
\end{longtable} \end{longtable}