Internal Commnuication
state.json
The file state file at data/state.json
is used to communicate between the parallel parts of the software.
Schema definition
root*(object)
Central state used to communicate between prodedures and with the mainloop.
additional properties allowed: false
system(object)
State values determined in the system checks procedure.
additional properties allowed: false
last_boot_time*(union)
The last boot time of the system
option 1(string)
option 2(null)
last_5_min_load*(union)
The average CPU load in the last 5 minutes in percent
option 1(number)
option 2(null)
pending_configs(array)
A list of pending config changes. This will be written to by the backend procedure and read by the updater procedure.
default: []
#(object)
Schema of a foreign config file for any other version of the software
to update to. It probably has more fields than listed in the schema. This
schema only includes the fields that are required in any new config to be
accepted by the updater in this version of the software.
A rendered API reference can be found in the documentation.
additional properties allowed: true
general*(object)
additional properties allowed: true
config_revision*(integer)
The revision of this config file. This should be incremented when the config file is changed. It is used to tag messages with the settings that were active at the time of sending.
min.: -1
software_version*(string)
A version string in the format of MAJOR.MINOR.PATCH[-(alpha|beta|rc).N]
regex pattern: "^\\d+\\.\\d+\\.\\d+(-(alpha|beta|rc)\\.\\d+)?$"
Message Archive Item
The message archive at data/messages
is split into daily files, with each line representing a message. Each line follows the schema defined below.
Schema definition
root*(object)
additional properties allowed: false
timestamp*(number)
Unix timestamp on the system when this message was created
message_body*(union)
option 1(object)
The body of a data message, defined by `body.variant == "data"`.
additional properties allowed: false
variant(constant)
Indicating the variant of the message. All possible message bodies have this field.
allowed value: "data"
data*(object)
The data to send to the backend
additional properties allowed: true
no schema enforced
option 2(object)
The body of a log message, defined by `body.variant == "log"`.
additional properties allowed: false
variant(constant)
Indicating the variant of the message. All possible message bodies have this field.
allowed value: "log"
level*(enum)
allowed values: [
"DEBUG",
"INFO",
"WARNING",
"ERROR",
"EXCEPTION"
]
subject*(string)
The subject of the log message. Try to move specific detailsto the body because then messages can be grouped by the subject - i.e. "give me all messages reporting high system load".
examples: [
"Starting procedure",
"System load too high"
]
body*(string)
The body of the log message
examples: [
"Here are some more details on the procedure starting",
"The system load is 87%"
]
option 3(object)
The body of a config message, defined by `body.variant == "config"`.
additional properties allowed: false
variant(constant)
Indicating the variant of the message. All possible message bodies have this field.
allowed value: "config"
status*(enum)
The status of the config. "received" is sent out by the backend process upon arrival. "accepted" means the config passed the tests and will be used after the termination that is issues upon acceptance. "rejected" means the config did either not fulfil the schema or not pass the tests. "startup" means that a mainloop using this config was started.
allowed values: [
"received",
"accepted",
"rejected",
"startup"
]
config*(object)
Schema of a foreign config file for any other version of the software
to update to. It probably has more fields than listed in the schema. This
schema only includes the fields that are required in any new config to be
accepted by the updater in this version of the software.
A rendered API reference can be found in the documentation.
additional properties allowed: true
general*(object)
additional properties allowed: true
config_revision*(integer)
The revision of this config file. This should be incremented when the config file is changed. It is used to tag messages with the settings that were active at the time of sending.
min.: -1
software_version*(string)
A version string in the format of MAJOR.MINOR.PATCH[-(alpha|beta|rc).N]
regex pattern: "^\\d+\\.\\d+\\.\\d+(-(alpha|beta|rc)\\.\\d+)?$"