diff --git a/health-and-repair/seats/mesh-watchdogs/fixtures/events.json b/health-and-repair/seats/mesh-watchdogs/fixtures/events.json new file mode 100644 index 0000000..2c50557 --- /dev/null +++ b/health-and-repair/seats/mesh-watchdogs/fixtures/events.json @@ -0,0 +1,24 @@ +[ + { + "name": "a machine's presence expired", + "of": "event:machine-away", + "subject": "mesh.seat.mesh-watchdogs.event.machine-away.g14", + "given": { + "v": 1, + "machine": "g14", + "at": "2026-11-11T10:00:00Z", + "last-heard": "2026-11-11T09:58:00Z" + } + }, + { + "name": "a machine heard again", + "of": "event:machine-back", + "subject": "mesh.seat.mesh-watchdogs.event.machine-back.g14", + "given": { + "v": 1, + "machine": "g14", + "at": "2026-11-11T10:30:00Z", + "last-heard": "2026-11-11T10:30:00Z" + } + } +] diff --git a/health-and-repair/seats/mesh-watchdogs/seat.json b/health-and-repair/seats/mesh-watchdogs/seat.json index 1efe7a8..d94c9a1 100644 --- a/health-and-repair/seats/mesh-watchdogs/seat.json +++ b/health-and-repair/seats/mesh-watchdogs/seat.json @@ -159,6 +159,82 @@ } } ], + "events": [ + { + "name": "machine-away", + "subject": "machine-away.", + "keep": { + "max-age-days": 90, + "max-mib": 16 + }, + "body": { + "type": "object", + "description": "the watchman's presence key of a machine expired (ADR 0564 4); published by the holder of this seat alone for another machine (design 47 G 436)", + "properties": { + "v": { + "type": "integer", + "description": "the layout's version" + }, + "machine": { + "type": "string", + "description": "the machine whose presence changed" + }, + "at": { + "type": "string", + "format": "date-time" + }, + "last-heard": { + "type": "string", + "format": "date-time", + "description": "when the machine was last heard" + } + }, + "required": [ + "v", + "machine", + "at", + "last-heard" + ] + } + }, + { + "name": "machine-back", + "subject": "machine-back.", + "keep": { + "max-age-days": 90, + "max-mib": 16 + }, + "body": { + "type": "object", + "description": "a machine is heard again after it was away", + "properties": { + "v": { + "type": "integer", + "description": "the layout's version" + }, + "machine": { + "type": "string", + "description": "the machine whose presence changed" + }, + "at": { + "type": "string", + "format": "date-time" + }, + "last-heard": { + "type": "string", + "format": "date-time", + "description": "when the machine was last heard" + } + }, + "required": [ + "v", + "machine", + "at", + "last-heard" + ] + } + } + ], "states": [ { "name": "presence",