Files
mesh-sdk/go/seatlist/seatlisttest/seats/mesh-self-check.json
T

166 lines
3.9 KiB
JSON

{
"format": 1,
"seat": "mesh-self-check",
"scope": "mesh",
"grain": "whole",
"domain": "Health and repair",
"decision": "novox/hq ADR 0564, ADR 0634, ADR 0635",
"description": "The mesh checking itself (ADR 0564): probes run every five minutes, each failure a finding the seat's conditions raise.",
"verbs": [
{
"name": "doctor",
"description": "The self-check: the last run's verdict at once, each probe passed, failed, deferred (its facts not on the bus yet, named) or could not run, and how long ago. With run, a run now; with probe, one probe's verdict whole. Runs every five minutes on its own; each failure is a finding.",
"input": {
"properties": {
"probe": {
"description": "one probe's id (D6): its verdict alone, with every finding",
"type": "string"
},
"run": {
"description": "\"true\": run every probe now and answer the verdict",
"enum": [
"true",
"false"
],
"type": "string"
}
},
"type": "object"
},
"answer": {
"type": "object",
"description": "the last run's verdict, or one probe's, or a run now"
}
},
{
"name": "probes",
"description": "The registry: what each probe asserts, where it reads its facts, and the finding it writes.",
"input": {
"properties": {},
"type": "object"
},
"answer": {
"type": "object",
"description": "the registry of probes"
}
}
],
"events": [
{
"name": "checked",
"body": {
"type": "object",
"description": "one run of the self-check",
"properties": {
"run": {
"type": "string"
},
"at": {
"type": "string",
"format": "date-time"
},
"started": {
"type": "string",
"format": "date-time"
},
"took": {
"type": "string"
},
"interval-seconds": {
"type": "integer"
},
"counts": {
"type": "object",
"properties": {
"passed": {
"type": "integer"
},
"failed": {
"type": "integer"
},
"failed-to-run": {
"type": "integer"
},
"deferred": {
"type": "integer"
}
}
},
"probes": {
"type": "array",
"items": {
"$ref": "#/defs/ProbeVerdict"
}
},
"controller": {
"type": "string"
},
"why": {
"type": "string"
},
"unsaid": {
"type": "integer"
}
},
"required": [
"run",
"at",
"probes"
]
}
}
],
"family": {
"name": "mesh-self-check.events",
"max-age-days": 7
},
"defs": {
"ProbeVerdict": {
"type": "object",
"description": "one probe's verdict",
"properties": {
"id": {
"type": "string"
},
"verdict": {
"type": "string",
"enum": [
"passed",
"failed",
"failed-to-run",
"deferred"
]
},
"found": {
"type": "array",
"items": {
"type": "string"
}
},
"unconfirmed": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"took": {
"type": "string"
},
"found-count": {
"type": "integer"
},
"more": {
"type": "string"
}
},
"required": [
"id",
"verdict"
]
}
}
}