the life cycle of a target and the long tail · lesson 6 of 9 · sources checked 2026-11-22
monitors at 1,000 targets
This lesson groups outcome alarms by target class and by cohort, with a sample floor for each group and a page budget for each shift.
purpose
One outcome alarm for each site works for a few sites. With many sites, the same rule calls the on-call engineer more times than one person can answer. A monitor plan must keep the calls inside a page budget, and still show each site that fails.
objectives
- Group outcome alarms by target class and by cohort.
- Set a sample floor for each target and each group.
- Keep a path from a group alarm down to each target.
- Explain why an alarm for each target breaks the page budget as the count of targets grows.
new terms
- page budget
- The maximum number of pages for one on-call shift.
how it works
A page is an alarm that calls the on-call engineer at once. The page budget is the maximum number of pages for one shift. More detail on the budget of a shift is in On-call (not yet published).
why an alarm for each target fails
Each target has a small chance of a break in each hour. With 10 targets, an alarm for each target gives few pages. With 1,000 targets, the same chance gives a page many times in each shift. The sizes 10, 100, 1,000, and 10,000 in this module are example sizes of a design question.
Many of those pages also have one cause. For example, a change of one detection product touches each target behind that product in the same hour. An alarm for each target then gives one page for each of those targets, but the engineer has one problem.
four levels of the monitor
The monitor reads the outcomes at four levels:
- The attempt: one outcome record, with the result, the status, and the time.
- The target: the success share of its attempts in one window.
- The target class: the targets with the same kind of content, for example lists of jobs.
- The cohort: the targets with the same detection class, across the target classes.
A target-class cohort is a group of targets that the monitor reads together. In this plan, each target class and each cohort is one such group. A detection class is the kind of protection that a site uses, as the record of the target gives it.
A target is red when the success share of its attempts in one window is below the limit of the plan. Only the group alarms send a page to the on-call engineer. A red target alone goes on a list, and the owner of the target reads the list each day.
the sample floor
A sample floor is the minimum number of events that an alarm must see before it can fire. Each level has its own floor.
For example, a target with 8 attempts in one hour and 2 successes has a low share. But 8 attempts are too few for a decision. The target goes on a list "below the sample floor", not into the alarm.
A target that stays below its floor for many hours is a problem of its own. The list shows it to the owner of the target.
A group also has a floor. A class is red only when enough of its targets are red, as a count and as a share. Thus one red target in a large class does not send a page to the on-call engineer.
the path down to each target
A group alarm says that something is wrong in a class or a cohort. The engineer must then find the targets. Each group alarm carries its list of red targets, and each target links to its last outcome records.
For example, a page for the class "job listing" lists three red targets. When all three are in one cohort, the engineer reads the cohort first, because one change can explain all three.
what a page starts
A monitor is an instrument of the operator. When a group alarm fires, the system slows the targets of the group, stops them, or sends them to a review. A page never starts a change that hides the collector or passes a refusal.
The review decides about a slower pace, a volume cap, the declared path, or a stop. For example, a cohort alarm after a change of one detection product stops the targets of that cohort until a review.
the count of pages
The plan counts the pages of each shift and compares the count with the budget. A count over the budget is a fault of the plan, not of the engineer. The cure is a change of the groups or of the floors, not a mute of the alarm.
For example, a class alarm can send a new page each hour while the class stays red. Then one problem uses the full budget. The cure is one page for each new red state of the class.
the two sides
| automation side | detection side |
|---|---|
| An alarm for each target gives more pages than one person can answer. Alarms by class and cohort keep the page count inside the budget, and the path down still shows each target. | A change of one detection product moves many targets at one time. The cohort alarm shows that change as one event, not as many separate alarms. |
design decisions
| option | gain | cost | when it is correct |
|---|---|---|---|
| An alarm for each target | Each failure is visible at once. | The page count grows with the count of targets. | For a few targets |
| Alarms by target class | One page for one problem of a class | A failure of one target does not call the on-call engineer. | For many targets with shared templates |
| Alarms by cohort | One page for one change of a detection class | The cohort must be correct in the records of each target. | When many targets share a detection class |
| A sample floor for each level | No page from too few events | A target with little traffic is slow to show a failure. | For each level, with a list for the targets below the floor |
| A daily list of red targets | The owner sees each failure without a page. | A slow failure of one target waits for the next read. | Together with the group alarms |
diagram
the monitor levels, from one attempt to a cohort of targets
- Page budgetThe count of pages in a shift, against the budget of the shift.
- CohortThe targets of one detection class, across the target classes. One change gives one page.
- Target classRed when enough targets of the class are red. Each class alarm links to its red targets.
- TargetRed when its success share falls, but only above the sample floor. No page alone.
- AttemptOne outcome record: success or failure, the status, and the time.
The second diagram gives the tools of each tier of the long tail. The monitor plan above is the row for 1,000 targets.
A matrix of four example sizes, from 10 to 10,000 targets, against four tools: extraction, monitors, repair, and owners. Bespoke extractors and an alarm for each target serve the small sizes. Templates by class, alarms by class and cohort, a repair queue with review, and owners by class serve the large sizes.
| example size | extraction | monitors | repair | owners |
|---|---|---|---|---|
| 10 targets | A bespoke extractor for each | An alarm for each target | A fix by the owner | One owner and one backup |
| 100 targets | Contract, first templates | Alarm for each target, sample floor | A fix by the owner, with a test | Two owners for each target |
| 1,000 targets | A template for each class | Alarms by class and cohort | Repair queue with review | Owners by class |
| 10,000 targets | Templates, generic for the tail | Class alarm, path to each target | Review by a risk sample | Owner map by class |
code example
The example uses synthetic targets and synthetic counts for the 12 hours of one shift. It compares the pages of an alarm for each target with the pages of alarms by class and cohort.
A class alarm with a sample floor for each group, and a counter of pages over the hours of one shift against the page budget.
// Class alarm with a sample floor, and a page counter over one shift against the page budget.
// All targets, classes, and counts are synthetic.
const SAMPLE_FLOOR = 20; // attempts that a target must have before it can be red
const RED_SHARE = 0.8; // a target is red below this success share
const CLASS_MIN_RED = 3; // a group is red with at least 3 red targets ...
const CLASS_RED_SHARE = 0.3; // ... that are at least 30% of its targets
const PAGE_BUDGET = 2; // pages in one shift
const SHIFT_HOURS = 12;
type Row = { target: string; cls: string; cohort: string; attempts: number; successes: number };
const row = (target: string, cls: string, cohort: string, attempts: number, successes: number): Row =>
({ target, cls, cohort, attempts, successes });
// The counts of one hour with a break of three targets.
const BROKEN_HOUR: Row[] = [
row("jobs-a", "job listing", "detection class 1", 40, 39),
row("jobs-b", "job listing", "detection class 1", 35, 20),
row("jobs-c", "job listing", "detection class 1", 30, 12),
row("jobs-d", "job listing", "detection class 2", 25, 15),
row("jobs-e", "job listing", "detection class 2", 8, 2),
row("event-a", "event listing", "detection class 1", 50, 49),
row("event-b", "event listing", "detection class 2", 45, 44),
];
// The other hours of the shift: each target passes all but one attempt.
const NORMAL_HOUR = BROKEN_HOUR.map((r) => ({ ...r, successes: r.attempts - 1 }));
const shift = (h: number) => (h >= 4 && h <= 7 ? BROKEN_HOUR : NORMAL_HOUR); // break in hours 4 to 7
function redTargets(rows: Row[]): Row[] {
return rows.filter((r) => r.attempts >= SAMPLE_FLOOR && r.successes / r.attempts < RED_SHARE);
}
function redGroups(rows: Row[], key: "cls" | "cohort"): Map<string, string[]> {
const red = redTargets(rows);
const alarms = new Map<string, string[]>();
for (const name of new Set(rows.map((r) => r[key]))) {
const members = rows.filter((r) => r[key] === name).length;
const hits = red.filter((r) => r[key] === name).map((r) => r.target);
if (hits.length >= CLASS_MIN_RED && hits.length / members >= CLASS_RED_SHARE) alarms.set(name, hits);
}
return alarms;
}
// One page for each new red state: a target or a group that was not red in the hour before.
let pagesEachTarget = 0, pagesByGroup = 0, groupRedHours = 0;
let wasRed = new Set<string>();
for (let h = 1; h <= SHIFT_HOURS; h++) {
const rows = shift(h);
const groups = new Map([...redGroups(rows, "cls"), ...redGroups(rows, "cohort")]);
const red = new Set([...redTargets(rows).map((r) => r.target), ...groups.keys()]);
for (const t of redTargets(rows)) if (!wasRed.has(t.target)) pagesEachTarget++;
for (const [name, hits] of groups) {
groupRedHours++;
if (!wasRed.has(name)) { pagesByGroup++; console.log(`hour ${h}: page, ${name} is red; path down: ${hits.join(", ")}`); }
}
wasRed = red;
}
console.log(`below the sample floor (no alarm, shown on a list): ${BROKEN_HOUR.filter((r) => r.attempts < SAMPLE_FLOOR).map((r) => r.target).join(", ")}`);
console.log(`pages in the shift, alarm for each target: ${pagesEachTarget} (budget ${PAGE_BUDGET})`);
console.log(`pages in the shift, alarm by class and cohort: ${pagesByGroup} (budget ${PAGE_BUDGET})`);
console.log(`pages in the shift, a group page in each red hour: ${groupRedHours} (budget ${PAGE_BUDGET})`);output
One line for each new page of a group, with its path down. Then the targets below the sample floor, and the pages of the shift for each alarm design.
hour 4: page, job listing is red; path down: jobs-b, jobs-c, jobs-d
below the sample floor (no alarm, shown on a list): jobs-e
pages in the shift, alarm for each target: 3 (budget 2)
pages in the shift, alarm by class and cohort: 1 (budget 2)
pages in the shift, a group page in each red hour: 4 (budget 2)The output shows one class page for the break of three targets, inside the budget of the shift. An alarm for each target gives three pages, and a group page in each red hour gives four.
data
pages for each shift against the count of lab targets
status of this figure: simulated
band: interval, level 0.95
source: Lab result of this course: simulation of alarms on a synthetic outcome log; date 2026-11-13; sample of 960; condition: Synthetic hourly log, one break in 60 days for each target, 8 runs of 60 days. A class is red when 3 or more and 30% or more of its targets are red. The example budget is 2 pages for each shift.
data table
| series | lab targets | pages in 1,000 shifts | interval |
|---|---|---|---|
| alarm for each target | 10 | 162.5 | 122.739 to 202.261 (level 0.95) |
| alarm for each target | 30 | 450 | 366.067 to 533.933 (level 0.95) |
| alarm for each target | 100 | 1629.17 | 1472.19 to 1786.15 (level 0.95) |
| alarm for each target | 300 | 4761.46 | 4258.88 to 5264.04 (level 0.95) |
| alarm for each target | 1,000 | 16556.2 | 15735.7 to 17376.8 (level 0.95) |
| alarm for each target | 3,000 | 48724 | 44589.7 to 52858.3 (level 0.95) |
| alarm for each target | 10,000 | 168721 | 158361 to 179080 (level 0.95) |
| alarm by class | 10 | 19.7917 | 10.7176 to 28.8658 (level 0.95) |
| alarm by class | 30 | 43.75 | 27.2005 to 60.2995 (level 0.95) |
| alarm by class | 100 | 165.625 | 120.561 to 210.689 (level 0.95) |
| alarm by class | 300 | 309.375 | 250.679 to 368.071 (level 0.95) |
| alarm by class | 1,000 | 314.583 | 290.521 to 338.645 (level 0.95) |
| alarm by class | 3,000 | 293.75 | 250.043 to 337.457 (level 0.95) |
| alarm by class | 10,000 | 320.833 | 286.299 to 355.368 (level 0.95) |
The budget of 2 pages for each shift is an example value, and it is the line at 2,000 pages in 1,000 shifts.
The pages of an alarm for each target grow with the count of lab targets and pass the budget line. The pages of the alarm by class stay below the budget line at each count of the chart.
failure modes
| problem | cause | correction |
|---|---|---|
| The on-call engineer gets more pages than the budget. | Each target has its own alarm that sends a page. | Send pages only from the class and cohort alarms. Put red targets on a daily list. |
| One change of a detection product gives many pages. | The monitor has no cohort level. | Add the cohort of each target to its record, and alarm on the cohort. |
| A target with little traffic sends a page for one failure. | The alarm has no sample floor. | Give each level a floor. Put the targets below the floor on a list. |
| A class page does not show which targets failed. | The group alarm has no path down. | Attach the list of red targets and their last outcome records to each group alarm. |
| A slow failure of one target is never seen. | Red targets go on a list that nobody reads. | Give each target an owner who reads the list each day. |
check questions
A change of one detection product touches many targets in many target classes. Which level of the monitor shows this change as one event?
- The attempt
- The target
- The cohort of the detection class
- The daily list of red targets
answer
c. The cohort of the detection class
The cohort holds the targets with the same detection class across the target classes. Thus one change gives one cohort alarm.
A target has 8 attempts in one hour and 2 successes. The sample floor is 20 attempts. What occurs?
- The target goes on the list below the sample floor.
- The target sends a page.
- The class of the target sends a page.
answer
a. The target goes on the list below the sample floor.
Below the sample floor, an alarm cannot fire. The target goes on a list, and its owner reads the list.
A page says that the class job listing is red. What must the page carry so that the engineer can find the targets?
sample answer
The list of the red targets of the class, and for each target a link to its last outcome records.
Explain why an alarm for each target breaks the page budget as the count of targets grows.
sample answer
Each target has a small chance of a break in each hour. With many targets, the same chance gives a page many times in each shift. Many of those pages also have one cause, for example one change of a detection product.
exercise
exercise Do this task on paper, with the synthetic records below. Do not send a request to a site.
Use these example rules:
- A target is red when its success share is below 80% and it has 20 or more attempts.
- A target with fewer than 20 attempts goes on the list "below the sample floor".
- A class is red when 3 or more of its targets are red, and they are 30% or more of its targets.
- The page budget is 2 pages for each shift.
The records of one hour:
| target | class | attempts | successes |
|---|---|---|---|
| food-a | recipe listing | 60 | 58 |
| food-b | recipe listing | 40 | 22 |
| food-c | recipe listing | 30 | 15 |
| food-d | recipe listing | 50 | 30 |
| food-e | recipe listing | 10 | 1 |
| news-a | article | 45 | 20 |
| news-b | article | 50 | 49 |
| news-c | article | 40 | 39 |
- Write the red targets.
- Write the targets below the sample floor.
- Write the red classes.
- Count the pages of an alarm for each target, and of an alarm by class.
- Compare each count with the page budget.
sample answer
The answer uses the example rules of the task.
The red targets are food-b (55%), food-c (50%), food-d (60%), and news-a (44%). Target food-e has 10 attempts, thus it goes on the list below the sample floor.
The class "recipe listing" has 3 red targets of 5, which is 60%. Thus it is red. The class "article" has 1 red target, thus it is not red.
An alarm for each target gives 4 pages in this hour, and the budget is 2 for the full shift. An alarm by class gives 1 page, with the path down to food-b, food-c, and food-d. Target news-a goes on the daily list of its owner.
sources
- My model of a monitor plan with alarms by target class and by cohort, with sample floors and a page budget, 2026-11 (not public).