{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Application Health", "description": "Schema for media type application/health+json", "type": "object", "properties": { "application": { "$ref": "#/definitions/application" }, "health": { "$ref": "#/definitions/health" }, "databases": { "$ref": "#/definitions/databases" }, "integrationpoints": { "$ref": "#/definitions/integrationpoints" }, "circuitbreakers": { "$ref": "#/definitions/circuitbreakers" }, "filesystems": { "$ref": "#/definitions/filesystems" } }, "required": [ "application", "health" ], "definitions": { "application": { "title": "Application Information", "description": "General information about application and current version", "type": "object", "properties": { "name": { "title": "Application name", "description": "Organization-wide unique name for identifying the application", "type": "string", "minLength": 1 }, "datetime": { "title": "Current date and time", "description": "The application's current date and time incl. timezone (in ISO 8601: https://tools.ietf.org/html/rfc3339#section-5.6)", "type": "string", "format": "date-time", "minLength": 1 }, "startup": { "title": "Startup timestamp", "description": "The date and time of when the application instance started (in ISO 8601: https://tools.ietf.org/html/rfc3339#section-5.6)", "type": "string", "format": "date-time", "minLength": 1 }, "uptime": { "title": "Application uptime", "description": "The duration how long the application instance is running in the format: \"2 days, 12:43:22\"", "type": "string", "pattern": "^\\d+ days, \\d{2}:\\d{2}:\\d{2}(.\\d+)*$", "minLength": 1 }, "hostname": { "title": "Hostname", "description": "Name of the host which is running the application instance", "type": "string", "format": "hostname", "minLength": 1 }, "version": { "title": "Version", "description": "Current application version", "type": "string", "minLength": 1 } }, "required": [ "name", "datetime", "startup", "uptime", "hostname" ] }, "health": { "title": "Health status", "description": "Global health status aggregated by groups", "type": "object", "properties": { "databases": { "type": "boolean" }, "integrationpoints": { "type": "boolean" }, "circuitbreakers": { "type": "boolean" }, "filesystem": { "type": "boolean" } } }, "database": { "title": "Database health", "description": "Detailed health information about a connected database", "type": "object", "properties": { "name": { "type": "string", "description": "Unique name/identifier of the database system", "minLength": 1 }, "essential": { "type": "boolean", "description": "Database is essential for overall application health" }, "health": { "type": "boolean", "description": "Connection established without any limitations" }, "latency": { "type": "number", "description": "Latency or duration for full roundtrip in milliseconds" }, "connections": { "type": "integer", "description": "Number of connections established" }, "error": { "type": "string", "description": "Connectivity error occured, if any" } }, "required": [ "name", "essential", "health", "latency" ] }, "integrationpoint": { "title": "Integration point health", "description": "Detailed health information about an integration point", "type": "object", "properties": { "name": { "type": "string", "description": "Unique name/identifier of the integraiton point", "minLength": 1 }, "uri": { "type": "string", "description": "Base URI of the integration point", "minLength": 1 }, "essential": { "type": "boolean", "description": "Integration point is essential for overall application health" }, "health": { "type": "boolean", "description": "Integration point callable without any limitations" }, "latency": { "type": "number", "description": "Latency or duration for full roundtrip in milliseconds" }, "lastCall": { "type": "string", "format": "date-time", "description": "Date and time of last call to integration point (in ISO 8601: https://tools.ietf.org/html/rfc3339#section-5.6)", "minLength": 1 }, "lastSuccess": { "type": "string", "format": "date-time", "description": "Date and time of last successful call to integration point (in ISO 8601: https://tools.ietf.org/html/rfc3339#section-5.6)", "minLength": 1 }, "callsLastMinute": { "type": "integer", "description": "Total number of calls to integration point within the last minute" }, "callsLastHour": { "type": "integer", "description": "Total number of calls to integration point within the last hour" }, "error": { "type": "string", "description": "Error occured when calling integration point, if any" } }, "required": [ "name", "essential", "health", "latency" ] }, "circuitbreaker": { "title": "Circuit breaker state", "description": "Detailed state information about a circuit breaker", "type": "object", "properties": { "name": { "type": "string", "description": "Unique name/identifier of the circuit breaker", "minLength": 1 }, "essential": { "type": "boolean", "description": "Service behind circuit breaker is essential for overall application health" }, "health": { "type": "boolean", "description": "True if circuit breaker is closed" }, "state": { "type": "string", "pattern": "^closed|half-open|open$", "description": "Current state of the circuit breaker" }, "timeout": { "type": "string", "format": "date-time", "description": "If state is \"open\", the date and time when the circuit breaker will switch back to half-open (in ISO 8601: https://tools.ietf.org/html/rfc3339#section-5.6)" }, "lastCall": { "type": "string", "format": "date-time", "description": "Date and time of last call through circuit breaker (in ISO 8601: https://tools.ietf.org/html/rfc3339#section-5.6)", "minLength": 1 }, "lastSuccess": { "type": "string", "format": "date-time", "description": "Date and time of last successful call through circuit breaker (in ISO 8601: https://tools.ietf.org/html/rfc3339#section-5.6)", "minLength": 1 }, "callsLastMinute": { "type": "integer", "description": "Total number of calls through circuit breaker within the last minute" }, "callsLastHour": { "type": "integer", "description": "Total number of calls through circuit breaker within the last hour" }, "error": { "type": "string", "description": "Error occured when calling circuit breaker, if any" } }, "required": [ "name", "essential", "health", "state" ] }, "filesystem": { "title": "File system health", "description": "Detailed health information about a mounted file system", "type": "object", "properties": { "name": { "type": "string", "description": "Unique name/identifier of the file system", "minLength": 1 }, "essential": { "type": "boolean", "description": "File system access is essential for overall application health" }, "health": { "type": "boolean", "description": "Filesystem is fully accessible with expected rights" }, "readable": { "type": "boolean", "description": "Filesystem is readable" }, "writable": { "type": "boolean", "description": "Filesystem is writable" }, "latency": { "type": "number", "description": "Latency or duration for full roundtrip in milliseconds" }, "error": { "type": "string", "description": "Connectivity error occured, if any" } }, "required": [ "name", "essential", "health", "latency" ] }, "databases": { "title": "Database health", "description": "Detailed health information about all connected databases", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/database" } }, "integrationpoints": { "title": "Integration point health", "description": "Detailed health information about all integration points", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/integrationpoint" } }, "circuitbreakers": { "title": "Circuit breaker health", "description": "Detailed health information about all circuit breakers", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/circuitbreaker" } }, "filesystems": { "title": "File system health", "description": "Detailed health information about all mounted file systems", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/filesystem" } } } }