skip to content

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 me

purpose

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

  1. Write a monitor design that names the class of failure that each monitor sees.
  2. Build a cost model of one hour of failed work against the cost of the monitors.
  3. Write a measurement plan that proves that each monitor can fire and stays quiet on a negative control.
  4. Write a risk list with operations, measurement, and target load risks, each with a control.
  5. 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 failureexamplemonitor that sees it
SilenceThe fleet runs and stores no result.A heartbeat alarm
Failed workJobs finish, and a large share fails.An outcome alarm
Fast failureEach job fails in one second, and the queue empties.An outcome alarm. Each shape alarm stays green.
EventA deploy rolls back, and each level stays true.An event alarm on the rollback
DriftA lab page changes, and its checks start to fail.A canary that alarms on a change from pass to fail
Wrong axisA 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:

  1. Test each log pattern against real lines of the week, and against a negative control line that must not match.
  2. 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.
  3. 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.

riskexamplecontrol
OperationsFalse alarms in quiet hoursA sample floor, and bad hours in a row
OperationsAn alarm that cannot fireA positive control for each alarm
MeasurementA failure on the wrong axisSeparate records for the tool, the proxy, and the target
Target loadRetries raise the traffic to a target.A retry cap for each target, and a slower pace after a refusal

the rubric

itemwhat a strong answer holdsmodule
SilenceHeartbeat alarms that count no data as a fault, with checks outside the monitored processOperations: monitors, failure triage, drift, maintenance
OutcomesFailure ratios with a sample floor, not counts, and a ratio over hours in a rowOperations: monitors, failure triage, drift, maintenance
Fast failuresA note that a fast failure empties the queue and keeps the shape alarms greenCollection architecture: queues, workers, schedulers, idempotent jobs, Operations: monitors, failure triage, drift, maintenance
Failure axisSeparate records for the tool, the proxy refusal, and the target blockThe success oracle: what counts as a success, Proxy design: types, trust, rotation, sessions, providers, failure modes
EventsAlarms for a rollback and other events that leave each level trueDeployment, supply chain, and security of the operation
DriftCanaries that alarm on a change from pass to failOperations: monitors, failure triage, drift, maintenance, Script analysis: static analysis, runtime traps, signal catalogs
ProofEach pattern tested against real lines, and each guard shown to fail one timeDeployment, supply chain, and security of the operation, Benchmark design and audit methods

the two sides

automation sidedetection 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

optiongaincostwhen it is correct
Shape alarms onlySimple, and they show a full queueA fast failure looks healthy.Never as the only monitors
Outcome alarm with a sample floorIt separates a broken fleet from a quiet one.Each job must write a result line.Each fleet that reports results
Bad hours in a rowOne noisy hour does not fire it.It fires later.Each ratio that a slow fault can change
Heartbeat alarm outside the fleetIt sees a fleet that does no work.One more process to runBeside each outcome alarm
Canary on a lab pageIt sees drift before the results change.A lab page to keepEach target class with a lab page
Broken copy of each guardIt proves that the guard can fail.One test for each guardAfter 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 same steps serve each brief of the module. A weak item goes back to the design through the module that explains it.source: Course design: the review steps of the design briefs

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

  1. 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
  2. Outcome alarmsRead the failure ratio of the finished jobs, with a sample floor, over hours in a row.pass
  3. 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
  4. Event alarmsFire on an event that leaves each level true, for example a deploy that rolls back.pass
  5. 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

Only the shape alarms miss a failure of the work. A review keeps them and adds the four other kinds.source: My model of the monitor map of a collection fleet

The third diagram shows the triage of one failed attempt.

triage of one failed attempt before it counts against a tool

A failed attempt counts against a tool only after three checks. Each other branch is a fault of the page, the fleet, or the design.source: My model of the triage of a failed attempt

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.

m36-x05-alarm-proof.mjsjavascript

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 fails

The 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.

problemcausecorrection
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

  1. Each job of a fleet fails in one second, and the queue empties. Which monitor sees this failure?

    1. An alarm on the queue depth
    2. An alarm on the wait time of the oldest message
    3. An outcome alarm on the failure ratio
    4. 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.

  2. 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?

    1. 10 u
    2. 40 u
    3. 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.

  3. 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.

  4. The retries of the fleet raise the traffic to one target. Which control of the risk list is correct?

    1. A retry cap for each target, and a slower pace after a refusal
    2. More retries in each hour, so that the jobs finish sooner
    3. 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.

  5. 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.

monitorwhat it readswhen it fires
A1Queue depthAbove 500 messages
A2Wait time of the oldest messageAbove 30 minutes
A3Count of worker processesAt 0 processes
A4Error lines in the worker logAbove 50 lines in one hour. A period with no data counts as OK.
A5Deploy resultWhen a deploy fails
  1. For each class of failure of the section "How it works", write the monitor of the list that sees it, or "none".
  2. For each "none", write the new monitor.
  3. 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

  1. 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).
  2. Benchmark platform, data (my test system): one audit of the worker log beside the alarm states, 2026-11 (not public).