{ "$defs": { "active": { "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": { "description": "in seconds or as text: minute, hour, day, week", "type": ["integer", "string"] }, "attentive_interval": { "description": "in seconds or as text: minute, hour, day, week", "type": ["integer", "string"] } }, "required": [ "regular_interval" ] }, "check_kind_test": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "test" }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "condition": { "type": "string", "enum": [ "unknown", "ok", "warning", "critical" ], "default": "warning" }, "output": { "type": "string", "default": "" } }, "required": [ ] } }, "required": [ "kind", "parameters" ] }, "check_kind_script": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "script" }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "path": { "type": "string" }, "arguments": { "type": "array", "item": { "type": "string" } } }, "required": [ "path" ] } }, "required": [ "kind", "parameters" ] }, "check_kind_file_timestamp": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "file_timestamp" }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "path": { "type": "string" }, "warning_age": { "type": "integer", "exclusiveMinimum": 0, "default": 3600 }, "critical_age": { "type": "integer", "exclusiveMinimum": 0, "default": 86400 }, "condition_on_missing": { "description": "which condition to report if file is missing", "type": "string", "enum": [ "unknown", "ok", "warning", "critical" ], "default": "warning" }, "condition_on_implausible": { "description": "which condition to report if the age is negative, i.e. the file is apparently from the future", "type": "string", "enum": [ "unknown", "ok", "warning", "critical" ], "default": "warning" } }, "required": [ "path" ] } }, "required": [ "kind", "parameters" ] }, "check_kind_http_request": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "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" ] }, "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": [ ] }, "as_warning": { "description": "whether a violation of this check shall be exposed as warning instead of critical; default: false", "type": "boolean", "default": false } }, "required": [ "request" ] } }, "required": [ "kind", "parameters" ] }, "notification_channel_console": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "console" }, "parameters": { "type": "object", "additionalProperties": false, "properties": { }, "required": [ ] } }, "required": [ "kind", "parameters" ] }, "notification_channel_file_touch": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "file_touch" }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "path": { "type": "string" } }, "required": [ "path" ] } }, "required": [ "kind", "parameters" ] }, "notification_channel_libnotify": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "libnotify" }, "parameters": { "type": "object", "additionalProperties": false, "properties": { "icon": { "type": "string" } }, "required": [ ] } }, "required": [ "kind", "parameters" ] }, "notification_channel_email": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "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", "item": { "type": "string" } }, "tags": { "description": "list of strings, which will be placed in the e-mail subject", "type": "array", "item": { "type": "string" }, "default": [] } }, "required": [ "access", "sender", "receivers" ] } }, "required": [ "kind", "parameters" ] }, "notifications": { "type": "array", "item": { "anyOf": [ { "$ref": "#/$defs/notification_channel_console" }, { "$ref": "#/$defs/notification_channel_file_touch" }, { "$ref": "#/$defs/notification_channel_email" } ] }, "default": [ { "kind": "console", "parameters": { } } ] } }, "type": "object", "additionalProperties": false, "properties": { "defaults": { "description": "default values for checks", "type": "object", "additionalProperties": false, "properties": { "active": { "$ref": "#/$defs/active" }, "threshold": { "$ref": "#/$defs/threshold" }, "annoy": { "$ref": "#/$defs/annoy" }, "schedule": { "$ref": "#/$defs/schedule" }, "notifications": { "$ref": "#/$defs/notifications" } }, "required": [ ] }, "checks": { "type": "object", "additionalProperties": { "allOf": [ { "description": "should represent a specific check", "type": "object", "additionalProperties": false, "properties": { "title": { "type": "string" }, "active": { "$ref": "#/$defs/active" }, "threshold": { "$ref": "#/$defs/threshold" }, "annoy": { "$ref": "#/$defs/annoy" }, "schedule": { "$ref": "#/$defs/schedule" }, "notifications": { "$ref": "#/$defs/notifications" } }, "required": [ ] }, { "anyOf": [ { "$ref": "#/$defs/check_kind_test" }, { "$ref": "#/$defs/check_kind_script" }, { "$ref": "#/$defs/check_kind_file_timestamp" }, { "$ref": "#/$defs/check_kind_http_request" } ] } ] }, "properties": { }, "required": [ ] } }, "required": [ "defaults", "groups" ] }