{ "type": "object", "additionalProperties": false, "properties": { "defaults": { "description": "default values for checks", "type": "object", "additionalProperties": false, "properties": { "active": { "description": "whether the check shall be executed", "type": "boolean", "default": true }, "threshold": { "description": "how often a condition has to occur in order to be reported", "type": "integer", "minimum": 1, "default": 3 }, "annoy": { "description": "whether notifications shall be kept sending after the threshold has been surpassed", "type": "boolean", "default": false }, "schedule": { "type": "object", "additionalProperties": false, "properties": { "regular_interval": { "anyOf": [ { "description": "in seconds", "type": "integer", "exclusiveMinimum": 0 }, { "description": "as text", "type": "string", "enum": [ "minute", "hour", "day", "week" ] } ], "default": 3600 }, "attentive_interval": { "anyOf": [ { "description": "in seconds", "type": "integer", "exclusiveMinimum": 0 }, { "description": "as text", "type": "string", "enum": [ "minute", "hour", "day", "week" ] } ], "default": 120 } }, "required": [] }, "notifications": { "type": "array", "items": { "anyOf": [ { "title": "notification channel 'console'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "console" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": {}, "required": [] } }, "required": [ "kind", "parameters" ] }, { "title": "notification channel 'email'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "email" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "access": { "type": "object", "additionalProperties": false, "properties": { "host": { "type": "string" }, "port": { "type": "integer" }, "username": { "type": "string" }, "password": { "type": "string" } }, "required": [ "host", "port", "username", "password" ] }, "sender": { "type": "string" }, "receivers": { "type": "array", "items": { "type": "string" } }, "tags": { "description": "list of strings, which will be placed in the e-mail subject", "type": "array", "items": { "type": "string" }, "default": [] } }, "required": [ "access", "sender", "receivers" ] } }, "required": [ "kind", "parameters" ] }, { "title": "notification channel 'libnotify'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "libnotify" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "icon": { "type": "string" } }, "required": [] } }, "required": [ "kind", "parameters" ] } ] }, "default": [ { "kind": "console", "parameters": {} } ] } }, "required": [] }, "checks": { "type": "array", "items": { "allOf": [ { "description": "should represent a specific check", "type": "object", "unevaluatedProperties": false, "properties": { "name": { "type": "string" }, "title": { "type": "string" }, "active": { "description": "whether the check shall be executed", "type": "boolean", "default": true }, "threshold": { "description": "how often a condition has to occur in order to be reported", "type": "integer", "minimum": 1, "default": 3 }, "annoy": { "description": "whether notifications shall be kept sending after the threshold has been surpassed", "type": "boolean", "default": false }, "schedule": { "type": "object", "additionalProperties": false, "properties": { "regular_interval": { "anyOf": [ { "description": "in seconds", "type": "integer", "exclusiveMinimum": 0 }, { "description": "as text", "type": "string", "enum": [ "minute", "hour", "day", "week" ] } ], "default": 3600 }, "attentive_interval": { "anyOf": [ { "description": "in seconds", "type": "integer", "exclusiveMinimum": 0 }, { "description": "as text", "type": "string", "enum": [ "minute", "hour", "day", "week" ] } ], "default": 120 } }, "required": [] }, "notifications": { "type": "array", "items": { "anyOf": [ { "title": "notification channel 'console'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "console" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": {}, "required": [] } }, "required": [ "kind", "parameters" ] }, { "title": "notification channel 'email'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "email" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "access": { "type": "object", "additionalProperties": false, "properties": { "host": { "type": "string" }, "port": { "type": "integer" }, "username": { "type": "string" }, "password": { "type": "string" } }, "required": [ "host", "port", "username", "password" ] }, "sender": { "type": "string" }, "receivers": { "type": "array", "items": { "type": "string" } }, "tags": { "description": "list of strings, which will be placed in the e-mail subject", "type": "array", "items": { "type": "string" }, "default": [] } }, "required": [ "access", "sender", "receivers" ] } }, "required": [ "kind", "parameters" ] }, { "title": "notification channel 'libnotify'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "libnotify" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "icon": { "type": "string" } }, "required": [] } }, "required": [ "kind", "parameters" ] } ] }, "default": [ { "kind": "console", "parameters": {} } ] } }, "required": [ "name" ] }, { "anyOf": [ { "title": "notification channel 'script'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "script" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "path": { "type": "string" }, "arguments": { "type": "array", "item": { "type": "string" } } }, "required": [ "path" ] } }, "required": [ "kind", "parameters" ] }, { "title": "notification channel 'file_state'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "file_state" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "path": { "type": "string" }, "strict": { "description": "whether a violation of this check shall be leveled as critical instead of concerning", "type": "boolean", "default": true }, "exist": { "description": "whether the file is supposed to exist or not", "type": "boolean", "default": true }, "age_threshold": { "description": "in seconds; ignored if 'exist' is set to false", "type": [ "null", "integer" ], "exclusiveMinimum": 0, "default": null }, "size_threshold": { "description": "in bytes; ignored if 'exist' is set to false", "type": "integer", "exclusiveMinimum": 0, "default": null } }, "required": [ "path" ] } }, "required": [ "kind", "parameters" ] }, { "title": "notification channel 'http_request'", "type": "object", "unevaluatedProperties": false, "properties": { "kind": { "type": "string", "enum": [ "http_request" ] }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "request": { "type": "object", "additionalProperties": false, "properties": { "target": { "description": "URL", "type": "string" }, "method": { "type": "string", "enum": [ "GET", "POST" ], "default": "GET" } }, "required": [ "target" ] }, "timeout": { "description": "maximum allowed execution time in seconds", "type": "float", "default": 5.0 }, "response": { "type": "object", "additionalProperties": false, "properties": { "status_code": { "description": "checks whether the response status code is this", "type": [ "null", "integer" ], "default": 200 }, "headers": { "description": "conjunctively checks header key-value pairs", "type": "object", "additionalProperties": { "description": "header value", "type": "string" }, "properties": {}, "required": [], "default": {} }, "body_part": { "description": "checks whether the response body contains this string", "type": "string" } }, "required": [] }, "strict": { "description": "whether a violation of this check shall be leveled as critical instead of concerning", "type": "boolean", "default": true } }, "required": [ "request" ] } }, "required": [ "kind", "parameters" ] } ] } ] } } }, "required": [ "defaults", "checks" ] }