ShtukbaseStandard

Factory alarms

alarms · version 0.1.1
Agents and automations2 norms2 checks

Alarms raised by the factory watchers, with a contour (open → closed or false): raise and close actions without duplicates, checks that an alarm says what fired and how it ended, and that a watcher has one open alarm.

About the package

The collection Alarms and its contour: open → closed or false. An alarm is raised by a watcher: an automation or a script that looks at the factory (disk, silent agents, failing runs). The short name of the watcher goes in watch.

Actions: shtuk run alarms raise --watch <watcher> --title "..." opens an alarm if that watcher has no open one yet; shtuk run alarms close --watch <watcher> --by "..." closes it and records who closed it and when.

Norms: ALR-R01 says an alarm states what fired and how it ended (check alarm); ALR-R02 says one open alarm per watcher (check one-open).

Why "alarms" and not "incidents": product incidents (a failure in the customer's environment) are the Incident kind of the Operations layer. An alarm is trouble in the agent factory itself. The watchers (what to watch and the thresholds) are automations of the automations package or project scripts; who to wake on an alarm is an automation too.

Norms 2

IDNormLevelModeEnforcer
ALR-R01
An alarm names the watcher and the time; a closed one says who closed it and when
SHOULD blocks
check
ALR-R02
While a watcher's alarm is open, the same watcher does not raise a new one
SHOULD blocks
check

"Blocks": the enforcer stops a violation. "Observes": it only notes it. Level MUST means required; SHOULD means yes by default.

Actions 5

NameWhat it doesFileWhen
placeAdd the Alarm kind to the placement mapbin/place.ts
after install after update
raiseOpen an alarm if the watcher has no open oneactions/raise.ts
shtuk run
closeClose the watcher's open alarms: who closed them and whenactions/close.ts
shtuk run
alarmAn alarm says what fired and how it ended
norm ALR-R01
checks/l01_alarm.ts
check
one-openOne open alarm per watcher
norm ALR-R02
checks/l02_one_open.ts
check

shtuk check runs the checks; shtuk run alarms <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.

Pages 7

They go into the project at these paths.

Package files 6

They go into .shtukbase/packages/alarms/; actions run from there.