Files
Codex (authorized Assignment 5 implementation) 6605394d7a
myfileagent-python-ci/pipeline/head This commit looks good
myfileagent-python-ci/pipeline/pr-main This commit looks good
Add Assignment 7 monitoring, tested alerts, and incident evidence
2026-10-28 17:51:31 +00:00

63 lines
3.9 KiB
Markdown

# SLI, SLO and error budget - Assignment 7
Status: baseline and controlled-outage short-window measurements completed.
No full-day SLO evaluation is claimed.
This file is an operational working note, not an edit to the team manual/PDF.
## Definitions and scope
SLI: fraction of received scheduled HTTPS login probes that succeed, reported
separately for Gitea and Jenkins, alongside expected/received sample coverage.
SLO: internal lab target of at least 99% successful scheduled probes over a
24-hour window for each service. No customer SLA is established by this lab.
SLA: a customer service agreement that may specify consequences for a miss.
A successful login probe does not establish Git operations or passing builds.
A same-Droplet probe does not prove external user reachability. A total host
outage may stop both collection and notification; missing data is unknown.
## Required hypothetical worked example (not measured results)
At a 30-second interval, 24 hours contains 2,880 scheduled probes per service.
Assume every scheduled observation is present.
- Gitea: 2,880 successes / 2,880 = 100%; meets the 99% target.
- Jenkins: 2,850 successes / 2,880 = 98.958333...%; misses the 99% target.
- The 1% theoretical budget is 28.8 failed samples, equivalent to 14.4 minutes
under uniform sampling. At most 28 whole failures meet this target.
- 30 failed samples exceed 28.8 by 1.2 samples, about 0.6 minutes.
These minute equivalents assume uniform sampling; they are not exact measured
outage durations and must not be presented as actual lab results.
## Measurement queries
See queries.json. The job filter is https and the instance label preserves
the exact Gitea/Jenkins URL. Each series is evaluated separately.
availability_percent: 100 * avg_over_time(probe_success{job="https"}[10m])
received_samples: count_over_time(probe_success{job="https"}[10m])
observed_failed_samples: count_over_time(...) - sum_over_time(...)
collection_health: up{job=~"https|blackbox|prometheus"}
A 10-minute interval has approximately 20 scheduled samples at 30 seconds.
Range boundaries, jitter and restarts can change received counts. avg_over_time
uses only received observations; an absent observation is not success.
The difference in the failure-count query is valid because probe_success is
binary. Count sample failures separately from exporter/collection failures.
Prometheus query evaluation time must be fixed and recorded for reproduction.
## Baseline check
The exact fixed query time, start/end, results and scrape-health observations
are saved in evidence/assignment7/sli-slo-baseline-query-check.json under
/home/codex/myfileagent-gitea. This checks queries against live data only.
It does not satisfy the controlled-outage evidence requirement or establish
that the 24-hour SLO was met. Do not extrapolate a short window into a day.
If missing samples are present, report coverage and the uncertainty explicitly;
a received-sample average alone cannot classify a complete-window SLO result.
## Later approved outage measurement
After alerts and their notification route work, agree on a maintenance window.
Record exact injection/recovery events, then select a short window spanning
before, during and after the controlled Jenkins outage. Use one timezone
(America/New_York) and record query evaluation time in UTC as well.
Evaluate both services at that exact time using the same 10-minute window.
Report successes/failures, received vs approximately expected samples, coverage,
collection health and known gaps. Save raw results and annotate the incident.
Keep the hypothetical example separate from measured findings.
Full-day collection and meeting the SLO are optional in manual version 1.42.
The October 24 incident is documented in ../incidents/2026-10-24-jenkins-outage.md.
Fixed window 17:23-17:33 EDT: both services 20/20 expected observations; Jenkins 12 successes/8 failures (60%), Gitea 20 successes/0 failures (100%). See ../evidence/jenkins-incident-sli-fixed-window.json.