← All message topics  ·  schema Status/status.json  ·  matches spec topic status/+/heartbeats

header

FieldTypeRequiredAllowed valuesDescription
timestamp string
message_type string status
version string The message format version

msg

FieldTypeRequiredAllowed valuesDescription
sub_type string heartbeat
source string
timestamp string
version string
experiment_id string|null
trial_id string|null
replay_parent_type string|null TRIAL REPLAY null Null null
replay_parent_id string|null
replay_id string|null

data

FieldTypeRequiredAllowed valuesDescription
state string ok OK info INFO Info warn Warn WARN error Error ERROR fail Fail FAIL
status string
active boolean

Example messages

{ "header": {
    "timestamp": "2019-12-26T14:05:02.3412Z",
    "message_type": "status",
    "version": "0.1"
    },
"msg": {
    "timestamp": "2019-12-26T14:05:02.5443Z",
    "sub_type": "heartbeat",
    "source": "reference_agent",
    "version": "0.3"
    },
"data": {
    "state": "ok"
    }
}
{ "header": {
    "timestamp": "2019-12-26T14:05:02.3412Z",
    "message_type": "status",
    "version": "0.1"
    },
"msg": {
    "timestamp": "2019-12-26T14:05:02.5443Z",
    "sub_type": "heartbeat",
    "source": "malmo",
    "version": "0.3"
    },
"data": {
    "active": false,
    "state": "error",
    "status": "Illegal format message received"
    }
}
Raw JSON Schema (resolved)
{
  "$id": "http://asist.aptima.com/schemas/status.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {},
  "properties": {
    "data": {
      "$id": "#/properties/data",
      "properties": {
        "active": {
          "$id": "#/properties/msg/properties/active",
          "examples": [
            true,
            false
          ],
          "pattern": "^(?i)(true|false)$",
          "title": "The active Schema",
          "type": "boolean"
        },
        "state": {
          "$id": "#/properties/msg/properties/state",
          "default": "ok",
          "enum": [
            "ok",
            "OK",
            "info",
            "INFO",
            "Info",
            "warn",
            "Warn",
            "WARN",
            "error",
            "Error",
            "ERROR",
            "fail",
            "Fail",
            "FAIL"
          ],
          "examples": [
            "ok"
          ],
          "pattern": "^(.*)$",
          "title": "The State Schema",
          "type": "string"
        },
        "status": {
          "$id": "#/properties/msg/properties/status",
          "default": "",
          "examples": [
            "Agent to too far behind in processing input messages."
          ],
          "pattern": "^(.*)$",
          "title": "The status message Schema",
          "type": "string"
        }
      },
      "required": [
        "state"
      ],
      "title": "The status heartbeat Data Schema",
      "type": "object"
    },
    "header": {
      "$id": "http://asist.aptima.com/schemas/common_header.json",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {},
      "properties": {
        "message_type": {
          "$id": "#/properties/message_type",
          "const": "status",
          "enum": [
            "control",
            "observation",
            "chat",
            "status",
            "trial",
            "event",
            "groundtruth",
            "experiment",
            "metadata",
            "agent"
          ],
          "examples": [
            "observation"
          ],
          "pattern": "^([a-z_]*?)$",
          "title": "The Message_type Schema",
          "type": "string"
        },
        "timestamp": {
          "$id": "#/properties/timestamp",
          "examples": [
            "2019-12-26T12:47:23.1234Z"
          ],
          "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
          "title": "The Timestamp Schema",
          "type": "string"
        },
        "version": {
          "$id": "#/properties/version",
          "examples": [
            "1.0",
            "2.3.1"
          ],
          "pattern": "^([0-9]+\\.)?([0-9]+\\.)?([0-9]+)$",
          "title": "The message format version",
          "type": "string"
        }
      },
      "required": [
        "timestamp",
        "message_type",
        "version"
      ],
      "title": "ASIST message common header Schema",
      "type": "object",
      "version": "0.3"
    },
    "msg": {
      "$id": "#/properties/msg",
      "properties": {
        "experiment_id": {
          "$id": "#/properties/experiment_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(null)|(Null)|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|^$)",
          "title": "The Experiment Id Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "replay_id": {
          "$id": "#/properties/replay_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(null)|(Null)|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|^$)",
          "title": "The Replay Id Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "replay_parent_id": {
          "$id": "#/properties/replay_parent_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(null)|(Null)|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|^$)",
          "title": "The Replay Parent Id Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "replay_parent_type": {
          "$id": "#/properties/replay_parent_type",
          "enum": [
            "TRIAL",
            "REPLAY",
            null,
            "Null",
            "null"
          ],
          "title": "The Replay Parent Type Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "$id": "#/properties/msg/properties/source",
          "example": [
            "malmo",
            "reference_agent"
          ],
          "pattern": "^(.*)$",
          "title": "The srouce Schema",
          "type": "string"
        },
        "sub_type": {
          "$id": "#/properties/msg/properties/sub_type",
          "const": "heartbeat",
          "example": [
            "heartbeat"
          ],
          "title": "The sub type Schema",
          "type": "string"
        },
        "timestamp": {
          "$id": "#/properties/timestamp",
          "default": "",
          "examples": [
            "2019-12-26T14:05:02.3412Z"
          ],
          "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
          "title": "The Timestamp Schema",
          "type": "string"
        },
        "trial_id": {
          "$id": "#/properties/trial_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(null)|(Null)|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|^$)",
          "title": "The Trial Id Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "$comment": "the pattern has a safety valve right now because we do not have a common version format.  When we do we should take out the first match clause.  The main part of the match shoud handle full semantic versioning identifiers",
          "$id": "#/properties/version",
          "default": "",
          "examples": [
            "1.0",
            "2.1.3"
          ],
          "pattern": "^([.]*)|(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
          "title": "The Version Schema",
          "type": "string"
        }
      },
      "required": [
        "sub_type",
        "source",
        "timestamp",
        "version"
      ],
      "title": "The Control Message Schema",
      "type": "object"
    }
  },
  "required": [
    "header",
    "msg"
  ],
  "title": "The ASIST status message Schema",
  "type": "object",
  "version": "0.2"
}
Upstream spec documentation

Status Message Format

A status message describes the status of a component in the testbed. These messages can be used as a simple heartbeat to indicate that the component is still functioning, or can provide more descriptive messages such as errors and failure indicators.

TOPIC

ALL STATUS

status/+/+

HEARTBEATS

status/+/heartbeats

Message Fields

Field Name Type Description
header object From Common Header Format section
msg object From Common Message format section. NOTE: the experiment_id, trial_id, and replay fields need not be filled in for heartbeat messages because the expeiment/trial may not have begin
data.state string The basic state of the component. One of ["ok", “info”, “warn”, “error”, “fail”]
data.status string [Optional] A message giving more detail about the status of the component
data.active boolean [Optional] true or false as to if the component is actively functioning

Message Examples

{ "header": {
    "timestamp": "2019-12-26T14:05:02.3412Z",
    "message_type": "status",
    "version": "0.1"
    },
"msg": {
    "timestamp": "2019-12-26T14:05:02.5443Z",
    "sub_type": "heartbeat",
    "source": "reference_agent",
    "version": "0.3"
    },
"data": {
    "state": "ok"
    }
}
{ "header": {
    "timestamp": "2019-12-26T14:05:02.3412Z",
    "message_type": "status",
    "version": "0.1"
    },
"msg": {
    "timestamp": "2019-12-26T14:05:02.5443Z",
    "sub_type": "heartbeat",
    "source": "malmo",
    "version": "0.3"
    },
"data": {
    "active": false,
    "state": "error",
    "status": "Illegal format message received"
    }
}