Brief
Define a freshness alert using an SLI, an SLO, and explicit measurement windows.
Imani is waiting for the log page that might confirm the crashed car's journey. Voss wants the report published immediately. Mara hands you three windows of ten expected deliveries: 9, then 8, then 7 pages on time. Decide when to notify the team and what to inspect before the fictional meeting. The urgency is in the story; the exercise has no timer.
Your mission
- Define the freshness SLI and its denominator.
- Calculate each window's percentage and say whether the 90% SLO is met.
- Apply the rule of two successive windows below the SLO.
- Write an alert that helps Imani without accusing a person.
How to check your work
- SLI = pages available within 15 minutes / pages expected.
- W1 = 90%, W2 = 80%, W3 = 70%.
- This rule alerts at W3 only.
- Message includes service, numbers, period, and a check of originals; no accusation.
Course example
# Fictional, non-overlapping windows of ten deliveries.
on_time_counts = [9, 8, 7]
target_percent = 90
previous_below = False
for window, on_time in enumerate(on_time_counts, start=1):
percent = 100 * on_time / 10
below = percent < target_percent
alert = below and previous_below
print(f"W{window}: {percent:.0f}% on time; alert={alert}")
previous_below = below