{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "services-health-schema", "type": "object", "title": "The root schema", "description": "The root schema comprises the entire JSON document.", "properties": { "id": { "type": "string", "examples": [ "AdminEssentials" ] }, "package_id": { "$ref": "services-schema#/definitions/model" }, "version": { "$ref": "#/definitions/version" }, "type": { "type": "string", "enum": [ "Adapter", "Application" ] }, "description": { "type": "string", "examples": [ "A basic description" ] }, "state": { "type": "string", "enum": [ "DEAD", "STOPPED", "RUNNING", "DELETED" ] }, "connection": { "type": "object", "oneOf": [ { "const": null }, { "properties": { "state": { "type": "string", "examples": [ "ONLINE" ] } } } ] }, "uptime": { "$ref": "#/definitions/uptime" }, "memoryUsage": { "$ref": "#/definitions/memoryUsage" }, "cpuUsage": { "$ref": "#/definitions/cpuUsage" }, "pid": { "$ref": "#/definitions/pid" }, "logger": { "type": "object", "properties": { "console": { "$ref": "services-schema#/definitions/log_level" }, "file": { "$ref": "services-schema#/definitions/log_level" }, "syslog": { "$ref": "services-schema#/definitions/sys_log_level" } } }, "routePrefix": { "type": "string", "examples": [ "admin", "search" ] }, "prevUptime": { "type": "number", "examples": [ 2245.9722 ] } }, "definitions": { "version": { "type": "string", "examples": [ "0.0.1", "0.1.0", "1.0.0", "1.1.1-2020.1.0" ] }, "cpuUsage": { "type": "object", "description": "Contains microsecond data for user and system modes. These values are used to calculate CPU usage (with implied conversions) by the following formula : (current CPU usage - previous CPU usage) / (current uptime - previous uptime)", "properties": { "user": { "description": "Microseconds spent in user mode", "type": "integer", "examples": [ 7125982 ] }, "system": { "description": "Microseconds spent in system mode", "type": "integer", "examples": [ 7125982 ] } } }, "uptime": { "type": "number", "description": "Number of seconds the current process has been running.", "examples": [ 2245.9722 ] }, "pid": { "type": "integer", "examples": [ 7125982 ] }, "memoryUsage": { "type": "object", "properties": { "rss": { "type": "integer", "description": "Resident Set Size - the amount of space occupied in the main memory - in bytes", "examples": [ 7125982 ] }, "heapTotal": { "type": "integer", "description": "Heap Total in bytes for the Node V8 engine", "examples": [ 7125982 ] }, "heapUsed": { "type": "integer", "description": "Heap Used in bytes by the Node V8 engine", "examples": [ 7125982 ] }, "external": { "type": "integer", "description": "External usage - memory usage of C++ objects bound to JavaScript objects managed by the Node V8 engine - in bytes", "examples": [ 7125982 ] } } } } }