design reviews · lesson 5 of 8 · sources checked 2026-11-22
brief 5: a review of the monitors of a collection fleet
This lesson gives the brief of a monitor review for a collection fleet whose alarms are green, and the rubric that scores the review.
status of this lesson: measured by mepurpose
An operator can read green alarms as health while the work fails, because each alarm sees only the value that it reads. A review of the monitor list finds each class of failure that no monitor can see, before such a failure reaches the results.
objectives
- Write a monitor design that names the class of failure that each monitor sees.
- Build a cost model of one hour of failed work against the cost of the monitors.
- Write a measurement plan that proves that each monitor can fire and stays quiet on a negative control.
- Write a risk list with operations, measurement, and target load risks, each with a control.
- Score a monitor review against the rubric, and name the module that explains each weak point.
new terms
how it works
A design brief gives a situation, its constraints, and the deliverables: a design, a cost model, a measurement plan, and a risk list. A reviewer scores them with a rubric, and each item of the rubric names the module that explains a weak point. The first diagram shows these review steps.
the brief
The brief is about your own lab only. All values are synthetic.
Situation:
- You get the alarm list, the dashboards, and one week of logs of a collection fleet in your own lab.
- The operator says that each alarm is green. For example, the alarm list holds five alarms.
Constraints:
- The review finds each class of failure that the current monitors cannot see.
- Each new monitor states the source of its threshold and a negative control.
classes of failure and the monitor of each class
A shape alarm reads a level of the infrastructure, for example the queue depth. It does not read the result of the work. The review asks, for each class of failure, which monitor sees it:
| class of failure | example | monitor that sees it |
|---|---|---|
| Silence | The fleet runs and stores no result. | A heartbeat alarm |
| Failed work | Jobs finish, and a large share fails. | An outcome alarm |
| Fast failure | Each job fails in one second, and the queue empties. | An outcome alarm. Each shape alarm stays green. |
| Event | A deploy rolls back, and each level stays true. | An event alarm on the rollback |
| Drift | A lab page changes, and its checks start to fail. | A canary that alarms on a change from pass to fail |
| Wrong axis | A proxy refusal counts as a fault of the tool. | Separate records for the tool, the proxy, and the target |
The outcome alarm reads the failure ratio: the failed jobs divided by the finished jobs in one period. Its sample floor keeps a quiet hour from firing it. For example, with a floor of 30 finished jobs, an hour with 8 finished jobs and 4 failed jobs reads 0.
A heartbeat alarm counts a period with no data as a fault. Its check runs outside the processes that it monitors, because a process that crashes cannot report its own state.
The third diagram shows the triage of one failed attempt. A failure counts against a tool only after the page and the other parts are ruled out.
what an audit of the benchmark platform found
An audit of the benchmark platform, my test system, read the worker log beside the alarm states. It found failed jobs while each alarm read OK. Each alarm read a value of the queue or of the hosts. No alarm read the results of the work. More detail is in Green alarms while most jobs failed (not yet published).
the cost model
The cost model compares one hour of failed work with the cost of the monitors. An hour of failed work costs its compute and proxy cost, and the rerun of its jobs.
example The fleet spends 5 u in each hour, in the invented money unit "u". With shape alarms only, a fault runs 10 hours before a person sees the results. An outcome alarm that fires after 2 bad hours stops it at 2 hours. One fault then costs 10 u, not 50 u. The added monitors cost 3 u each month.
the measurement plan
Each monitor must show that it can fire, and that it stays quiet when the work is healthy:
- Test each log pattern against real lines of the week, and against a negative control line that must not match.
- Make a broken copy of each guard, for example a heartbeat alarm that counts no data as good. The test of the guard must then fail one time.
- Give each alarm a positive control: a lab fault with a known result that must fire it.
the risk list
Each risk gets one control. For example, a sample floor stops the false alarms of quiet hours.
| risk | example | control |
|---|---|---|
| Operations | False alarms in quiet hours | A sample floor, and bad hours in a row |
| Operations | An alarm that cannot fire | A positive control for each alarm |
| Measurement | A failure on the wrong axis | Separate records for the tool, the proxy, and the target |
| Target load | Retries raise the traffic to a target. | A retry cap for each target, and a slower pace after a refusal |
the rubric
the two sides
| automation side | detection side |
|---|---|
| The operator of the fleet reads the monitors. A green shape alarm says only that a level of the infrastructure is in its range. | A monitor must see the outcomes and the silence of the work, not only the shape of the infrastructure. A refusal page or an empty result gives no error line. |
design decisions
| option | gain | cost | when it is correct |
|---|---|---|---|
| Shape alarms only | Simple, and they show a full queue | A fast failure looks healthy. | Never as the only monitors |
| Outcome alarm with a sample floor | It separates a broken fleet from a quiet one. | Each job must write a result line. | Each fleet that reports results |
| Bad hours in a row | One noisy hour does not fire it. | It fires later. | Each ratio that a slow fault can change |
| Heartbeat alarm outside the fleet | It sees a fleet that does no work. | One more process to run | Beside each outcome alarm |
| Canary on a lab page | It sees drift before the results change. | A lab page to keep | Each target class with a lab page |
| Broken copy of each guard | It proves that the guard can fail. | One test for each guard | After each change of a monitor |
diagram
The first diagram shows the review steps of each brief.
the review steps: from a brief to a rubric score
The second diagram is the monitor map of the review.
the monitor map: the value that each kind of monitor reads, and if it sees a failure of the work
- Shape alarmsRead the queue depth, the wait time of the oldest message, and the process count. A fast failure makes these values look better.fail
- Outcome alarmsRead the failure ratio of the finished jobs, with a sample floor, over hours in a row.pass
- Heartbeat alarmsFire when no result is stored in a period. A period with no data counts as a fault. The check runs outside the fleet.pass
- Event alarmsFire on an event that leaves each level true, for example a deploy that rolls back.pass
- CanariesA fixed check on a lab page. It alarms on a change from pass to fail.pass
A review keeps the shape alarms and adds the four other kindsno result
The third diagram shows the triage of one failed attempt.
triage of one failed attempt before it counts against a tool
code example
The example gives the alarm rules as JavaScript functions on synthetic counts. It runs each rule on two negative controls and on its positive control. It also runs a broken copy of the heartbeat alarm.
An outcome alarm and a heartbeat alarm, each tested on two negative controls and one positive control, and a broken copy that cannot fire.
// A failure-ratio alarm with a sample floor, a heartbeat alarm, and the proof
// that each alarm can fire. The counts are synthetic: one record for each hour.
const FLOOR = 30; // example value: finished jobs that the ratio must see
const THRESHOLD = 0.2; // example value: failed share of a bad hour
const BAD_HOURS = 2; // bad hours in a row before the outcome alarm fires
const SILENT_HOURS = 2; // example value: hours with no stored result
function outcomeAlarm(hours) {
let row = 0;
return hours.some((h) => {
const finished = h.finished ?? 0;
const ratio = finished >= FLOOR ? (h.failed ?? 0) / finished : 0;
row = ratio > THRESHOLD ? row + 1 : 0;
return row >= BAD_HOURS;
});
}
// An hour with no data counts as an hour with no stored result.
function heartbeatAlarm(hours) {
let silent = 0;
return hours.some((h) => {
silent = (h.stored ?? 0) > 0 ? 0 : silent + 1;
return silent >= SILENT_HOURS;
});
}
// A broken copy: an hour with no data counts as a good hour.
function heartbeatAlarmNoDataIsGood(hours) {
let silent = 0;
return hours.some((h) => {
silent = h.stored === undefined || h.stored > 0 ? 0 : silent + 1;
return silent >= SILENT_HOURS;
});
}
// Two negative controls must not fire any rule. Each rule has one positive control that must fire it.
const negative = [
{ name: "busy healthy hours", hours: [
{ finished: 200, failed: 8, stored: 192 }, { finished: 180, failed: 5, stored: 175 }, { finished: 210, failed: 9, stored: 201 }] },
{ name: "quiet hours below the floor", hours: [
{ finished: 10, failed: 5, stored: 5 }, { finished: 8, failed: 4, stored: 4 }, { finished: 12, failed: 6, stored: 6 }] },
];
const fast = { name: "fast failures", hours: [
{ finished: 220, failed: 10, stored: 210 }, { finished: 400, failed: 360, stored: 40 }, { finished: 420, failed: 390, stored: 30 }] };
const silence = { name: "no data from the fleet", hours: [{ finished: 190, failed: 7, stored: 183 }, {}, {}] };
const rules = [
["outcome alarm", outcomeAlarm, fast],
["heartbeat alarm", heartbeatAlarm, silence],
["heartbeat alarm, broken copy", heartbeatAlarmNoDataIsGood, silence],
];
for (const [rule, fires, positive] of rules) {
const quiet = negative.filter((n) => !fires(n.hours)).length;
const fired = fires(positive.hours);
const proof = quiet === negative.length && fired ? "proof passes" : "proof fails";
console.log(`${rule}: quiet on ${quiet} of ${negative.length} negative controls; ${fired ? "fires" : "quiet"} on "${positive.name}": ${proof}`);
}output
One line for each rule: the negative controls on which it stays quiet, its result on its positive control, and the result of the proof.
outcome alarm: quiet on 2 of 2 negative controls; fires on "fast failures": proof passes
heartbeat alarm: quiet on 2 of 2 negative controls; fires on "no data from the fleet": proof passes
heartbeat alarm, broken copy: quiet on 2 of 2 negative controls; quiet on "no data from the fleet": proof failsThe output shows that both rules stay quiet on the healthy hours and on the quiet hours below the floor. Each rule fires on its positive control. The broken copy stays quiet when no data comes, thus its proof fails.
failure modes
These are common weak answers to the brief, each with the module that explains the weak point.
| problem | cause | correction |
|---|---|---|
| The review accepts the green alarms. | Each alarm reads the shape of the infrastructure. | Add outcome alarms and heartbeat alarms. More detail is in Operations: monitors, failure triage, drift, maintenance. |
| The new alarm counts errors in each hour. | A count changes with the volume of work. | Use a failure ratio with a sample floor. |
| The heartbeat alarm stays OK while the fleet stores nothing. | It counts a period with no data as good. | Count no data as a fault, and run the check outside the fleet. |
| Proxy refusals lower the score of a tool. | All failures go to one record. | Keep separate records for the tool, the proxy, and the target. More detail is in The success oracle: what counts as a success. |
| A new monitor never fires in the test. | Nobody proved that it can fire. | Give it a positive control and a broken copy. More detail is in Benchmark design and audit methods. |
| The retries of the fleet raise the load on a target. | The plan has no retry cap. | Cap the retries for each target, and slow the pace after a refusal. |
check questions
Each job of a fleet fails in one second, and the queue empties. Which monitor sees this failure?
- An alarm on the queue depth
- An alarm on the wait time of the oldest message
- An outcome alarm on the failure ratio
- An alarm on the count of worker processes
answer
c. An outcome alarm on the failure ratio
A fast failure makes the queue values look better, thus each shape alarm stays green. The outcome alarm reads the failed jobs divided by the finished jobs.
A fleet spends 5 u in each hour. A fault runs for 10 hours with shape alarms only, and for 2 hours with an outcome alarm. How much does the outcome alarm save on one fault?
- 10 u
- 40 u
- 50 u
answer
b. 40 u
The fault costs 10 x 5 u = 50 u with shape alarms only, and 2 x 5 u = 10 u with the outcome alarm. The difference is 40 u.
You add a heartbeat alarm. Write the two tests that prove that it works.
sample answer
First, a positive control: a lab fault that stops the stored results must fire the alarm. Second, a negative control: a normal quiet period must not fire it. A broken copy of the alarm that counts no data as good must fail the first test.
The retries of the fleet raise the traffic to one target. Which control of the risk list is correct?
- A retry cap for each target, and a slower pace after a refusal
- More retries in each hour, so that the jobs finish sooner
- A new alarm on the queue depth
answer
a. A retry cap for each target, and a slower pace after a refusal
The risk is target load. A cap and a slower pace lower the traffic to the target.
A review adds a heartbeat alarm that counts a period with no data as OK. Name the weak rubric item, and name a module that explains it.
sample answer
The weak item is silence: a heartbeat alarm must count no data as a fault, and its check must run outside the monitored process. Module M28 explains it.
exercise
exercise Do this task on paper. Use only the synthetic monitor list below. It is the monitor list of the fleet of the brief.
| monitor | what it reads | when it fires |
|---|---|---|
| A1 | Queue depth | Above 500 messages |
| A2 | Wait time of the oldest message | Above 30 minutes |
| A3 | Count of worker processes | At 0 processes |
| A4 | Error lines in the worker log | Above 50 lines in one hour. A period with no data counts as OK. |
| A5 | Deploy result | When a deploy fails |
- For each class of failure of the section "How it works", write the monitor of the list that sees it, or "none".
- For each "none", write the new monitor.
- For each new monitor, write its negative control and its positive control.
sample answer
The answer uses the classes of failure and the measurement plan of the section "How it works".
Silence: none. A3 sees only processes that stop. A4 counts no data as OK. Add a heartbeat alarm on stored results that counts no data as a fault. Its negative control is a normal quiet hour, and its positive control is a lab fault that stops the writes.
Failed work: none. A4 counts error lines, and a refusal page gives no error line. Add an outcome alarm on the failure ratio with a sample floor. Its negative control is a quiet hour below the floor. Its positive control is a lab address that refuses each connection.
Fast failure: none. A1 and A2 go down when the jobs fail fast. The outcome alarm also covers this class.
Event: none. A5 sees a failed deploy, not a deploy that rolls back. Add an event alarm on the rollback, with a lab rollback as its positive control.
Drift: none. Add a canary on a lab page that alarms on a change from pass to fail. Its positive control is a lab change of the page.
Wrong axis: none. Add separate records for the tool, the proxy, and the target, and test them with one lab fault of each kind.
sources
- My model of the classes of failure, the monitor map, the cost of an hour of failed work, and the rubric of the review, 2026-11 (not public).
- Benchmark platform, data (my test system): one audit of the worker log beside the alarm states, 2026-11 (not public).