{
	"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 about non-ok states 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": [
										"null",
										"integer"
									],
									"exclusiveMinimum": 0
								},
								{
									"description": "as text",
									"type": "string",
									"enum": [
										"minute",
										"hour",
										"day",
										"week"
									]
								}
							],
							"default": 3600
						},
						"attentive_interval": {
							"anyOf": [
								{
									"description": "in seconds",
									"type": [
										"null",
										"integer"
									],
									"exclusiveMinimum": 0
								},
								{
									"description": "as text",
									"type": "string",
									"enum": [
										"minute",
										"hour",
										"day",
										"week"
									]
								}
							],
							"default": 120
						},
						"reminding_interval": {
							"anyOf": [
								{
									"description": "in seconds",
									"type": "integer",
									"exclusiveMinimum": 0
								},
								{
									"description": "as text",
									"type": "string",
									"enum": [
										"minute",
										"hour",
										"day",
										"week"
									]
								}
							],
							"default": 86400
						}
					},
					"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": []
		},
		"includes": {
			"type": "array",
			"items": {
				"type": "string"
			},
			"default": [],
			"description": "list of relative or absolute paths to other hmdl files on the local machine, which shall be subsumed in the overall monitoring task"
		},
		"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 about non-ok states 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": [
													"null",
													"integer"
												],
												"exclusiveMinimum": 0
											},
											{
												"description": "as text",
												"type": "string",
												"enum": [
													"minute",
													"hour",
													"day",
													"week"
												]
											}
										],
										"default": 3600
									},
									"attentive_interval": {
										"anyOf": [
											{
												"description": "in seconds",
												"type": [
													"null",
													"integer"
												],
												"exclusiveMinimum": 0
											},
											{
												"description": "as text",
												"type": "string",
												"enum": [
													"minute",
													"hour",
													"day",
													"week"
												]
											}
										],
										"default": 120
									},
									"reminding_interval": {
										"anyOf": [
											{
												"description": "in seconds",
												"type": "integer",
												"exclusiveMinimum": 0
											},
											{
												"description": "as text",
												"type": "string",
												"enum": [
													"minute",
													"hour",
													"day",
													"week"
												]
											}
										],
										"default": 86400
									}
								},
								"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": "check '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"
										]
									},
									"custom": {
										"description": "custom data, which shall be attached to notifications",
										"default": null
									}
								},
								"required": [
									"kind",
									"parameters"
								]
							},
							{
								"title": "check 'file_state'",
								"type": "object",
								"unevaluatedProperties": false,
								"properties": {
									"kind": {
										"type": "string",
										"enum": [
											"file_state"
										]
									},
									"parameters": {
										"type": "object",
										"additionalProperties": false,
										"properties": {
											"path": {
												"type": "string"
											},
											"exist_mode": {
												"description": "whether the file is supposed to exist or not",
												"type": "boolean",
												"default": true
											},
											"exist_critical": {
												"description": "whether a violation of the extist state (parameter 'exist_mode') shall be considered as critical (true) or concerning (false)",
												"type": "boolean",
												"default": true
											},
											"age_threshold_concerning": {
												"description": "in seconds; ignored if 'exist_mode' is set to false",
												"type": [
													"null",
													"integer"
												],
												"exclusiveMinimum": 0,
												"default": null
											},
											"age_threshold_critical": {
												"description": "in seconds; ignored if 'exist_mode' is set to false",
												"type": [
													"null",
													"integer"
												],
												"exclusiveMinimum": 0,
												"default": null
											},
											"size_threshold_concerning": {
												"description": "in bytes; ignored if 'exist_mode' is set to false",
												"type": [
													"null",
													"integer"
												],
												"exclusiveMinimum": 0,
												"default": null
											},
											"size_threshold_critical": {
												"description": "in bytes; ignored if 'exist_mode' is set to false",
												"type": [
													"null",
													"integer"
												],
												"exclusiveMinimum": 0,
												"default": null
											},
											"strict": {
												"deprecated": true,
												"description": "",
												"type": "boolean",
												"default": true
											},
											"exist": {
												"deprecated": true,
												"description": "",
												"type": "boolean",
												"default": true
											},
											"age_threshold": {
												"deprecated": true,
												"description": "",
												"type": [
													"null",
													"integer"
												],
												"exclusiveMinimum": 0,
												"default": null
											},
											"size_threshold": {
												"deprecated": true,
												"description": "",
												"type": [
													"null",
													"integer"
												],
												"exclusiveMinimum": 0,
												"default": null
											}
										},
										"required": [
											"path"
										]
									},
									"custom": {
										"description": "custom data, which shall be attached to notifications",
										"default": null
									}
								},
								"required": [
									"kind",
									"parameters"
								]
							},
							{
								"title": "check 'tls_certificate'",
								"type": "object",
								"unevaluatedProperties": false,
								"properties": {
									"kind": {
										"type": "string",
										"enum": [
											"tls_certificate"
										]
									},
									"parameters": {
										"type": "object",
										"additionalProperties": false,
										"properties": {
											"host": {
												"type": "string"
											},
											"port": {
												"type": "integer",
												"default": 443
											},
											"expiry_threshold_concerning": {
												"description": "in days; allowed amount of valid days before the certificate expires; threshold for condition 'concerning'; 'null' means 'report at no value'",
												"type": [
													"null",
													"integer"
												],
												"default": 7,
												"minimum": 0
											},
											"expiry_threshold_critical": {
												"description": "in days; allowed amount of valid days before the certificate expires; threshold for condition 'critical'; 'null' means 'report at no value'",
												"type": [
													"null",
													"integer"
												],
												"default": 1,
												"minimum": 0
											},
											"expiry_threshold": {
												"deprecated": true,
												"description": "",
												"type": [
													"null",
													"integer"
												],
												"minimum": 0,
												"default": null
											},
											"strict": {
												"deprecated": true,
												"description": "",
												"type": [
													"null",
													"boolean"
												],
												"default": null
											}
										},
										"required": [
											"host"
										]
									},
									"custom": {
										"description": "custom data, which shall be attached to notifications",
										"default": null
									}
								},
								"required": [
									"kind",
									"parameters"
								]
							},
							{
								"title": "check '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
											},
											"follow_redirects": {
												"description": "whether redirect instructions in responses shall be followend instead of being exposed as result",
												"type": "boolean",
												"default": false
											},
											"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": []
											},
											"critical": {
												"description": "whether a violation of this check shall be leveled as critical instead of concerning",
												"type": "boolean",
												"default": true
											},
											"strict": {
												"deprecated": true,
												"description": "alias for 'critical'",
												"type": "boolean",
												"default": true
											}
										},
										"required": [
											"request"
										]
									},
									"custom": {
										"description": "custom data, which shall be attached to notifications",
										"default": null
									}
								},
								"required": [
									"kind",
									"parameters"
								]
							},
							{
								"title": "check 'generic_remote'",
								"type": "object",
								"unevaluatedProperties": false,
								"properties": {
									"kind": {
										"type": "string",
										"enum": [
											"generic_remote"
										]
									},
									"parameters": {
										"type": "object",
										"additionalProperties": false,
										"properties": {
											"host": {
												"type": "string"
											},
											"ssh_port": {
												"type": [
													"null",
													"integer"
												],
												"default": null
											},
											"ssh_user": {
												"type": [
													"null",
													"string"
												],
												"default": null
											},
											"ssh_key": {
												"type": [
													"null",
													"string"
												],
												"default": null
											},
											"mount_point": {
												"type": "string",
												"default": "/"
											},
											"threshold": {
												"type": "integer",
												"default": 95,
												"description": "maximaler F\u00fcllstand in Prozent"
											},
											"critical": {
												"description": "whether a violation of this check shall be leveled as critical instead of concerning",
												"type": "boolean",
												"default": true
											},
											"strict": {
												"deprecated": true,
												"description": "alias for 'critical'",
												"type": "boolean",
												"default": true
											}
										},
										"required": [
											"host"
										]
									},
									"custom": {
										"description": "custom data, which shall be attached to notifications",
										"default": null
									}
								},
								"required": [
									"kind",
									"parameters"
								]
							}
						]
					}
				]
			}
		}
	},
	"required": []
}
