core/doc/hmdl.schema.json

775 lines
18 KiB
JSON
Raw Normal View History

{
"type": "object",
"additionalProperties": false,
"properties": {
"defaults": {
"description": "default values for checks",
"type": "object",
"additionalProperties": false,
"properties": {
"active": {
2022-12-12 12:31:51 +01:00
"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": {
2023-03-22 14:25:21 +01:00
"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": [
{
2022-12-12 12:31:51 +01:00
"description": "in seconds",
2023-03-22 14:25:21 +01:00
"type": [
"null",
"integer"
],
"exclusiveMinimum": 0
},
{
2022-12-12 12:31:51 +01:00
"description": "as text",
"type": "string",
"enum": [
"minute",
"hour",
"day",
"week"
]
}
],
"default": 3600
},
"attentive_interval": {
"anyOf": [
{
2022-12-12 12:31:51 +01:00
"description": "in seconds",
2023-03-22 14:25:21 +01:00
"type": [
"null",
"integer"
],
"exclusiveMinimum": 0
},
{
2022-12-12 12:31:51 +01:00
"description": "as text",
"type": "string",
"enum": [
"minute",
"hour",
"day",
"week"
]
}
],
"default": 120
2023-03-22 14:25:21 +01:00
},
"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": [
{
2022-12-12 12:39:25 +01:00
"title": "notification channel 'console'",
"type": "object",
"unevaluatedProperties": false,
"properties": {
"kind": {
"type": "string",
"enum": [
"console"
]
},
"parameters": {
"type": "object",
"additionalProperties": false,
"properties": {},
"required": []
}
},
"required": [
"kind",
"parameters"
]
},
{
2022-12-12 12:39:25 +01:00
"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"
]
},
{
2022-12-12 12:39:25 +01:00
"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": []
},
2023-03-03 18:50:21 +01:00
"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": {
2022-12-12 12:31:51 +01:00
"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": {
2023-03-22 14:25:21 +01:00
"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": [
{
2022-12-12 12:31:51 +01:00
"description": "in seconds",
2023-03-22 14:25:21 +01:00
"type": [
"null",
"integer"
],
"exclusiveMinimum": 0
},
{
2022-12-12 12:31:51 +01:00
"description": "as text",
"type": "string",
"enum": [
"minute",
"hour",
"day",
"week"
]
}
],
"default": 3600
},
"attentive_interval": {
"anyOf": [
{
2022-12-12 12:31:51 +01:00
"description": "in seconds",
2023-03-22 14:25:21 +01:00
"type": [
"null",
"integer"
],
"exclusiveMinimum": 0
},
{
2022-12-12 12:31:51 +01:00
"description": "as text",
"type": "string",
"enum": [
"minute",
"hour",
"day",
"week"
]
}
],
"default": 120
2023-03-22 14:25:21 +01:00
},
"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": [
{
2022-12-12 12:39:25 +01:00
"title": "notification channel 'console'",
"type": "object",
"unevaluatedProperties": false,
"properties": {
"kind": {
"type": "string",
"enum": [
"console"
]
},
"parameters": {
"type": "object",
"additionalProperties": false,
"properties": {},
"required": []
}
},
"required": [
"kind",
"parameters"
]
},
{
2022-12-12 12:39:25 +01:00
"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"
]
},
{
2022-12-12 12:39:25 +01:00
"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": [
{
2023-02-06 16:06:18 +01:00
"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"
]
}
},
"required": [
"kind",
"parameters"
]
},
{
2023-02-06 16:06:18 +01:00
"title": "check 'file_state'",
"type": "object",
"unevaluatedProperties": false,
"properties": {
"kind": {
"type": "string",
"enum": [
2022-12-12 12:31:51 +01:00
"file_state"
]
},
"parameters": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string"
},
2022-12-12 12:31:51 +01:00
"strict": {
"description": "whether a violation of this check shall be leveled as critical instead of concerning",
"type": "boolean",
"default": true
},
2022-12-12 12:31:51 +01:00
"exist": {
"description": "whether the file is supposed to exist or not",
"type": "boolean",
"default": true
},
2022-12-12 12:31:51 +01:00
"age_threshold": {
"description": "in seconds; ignored if 'exist' is set to false",
"type": [
"null",
"integer"
],
2022-12-12 12:31:51 +01:00
"exclusiveMinimum": 0,
"default": null
},
2022-12-12 12:31:51 +01:00
"size_threshold": {
"description": "in bytes; ignored if 'exist' is set to false",
"type": "integer",
"exclusiveMinimum": 0,
"default": null
}
},
"required": [
"path"
]
}
},
"required": [
"kind",
"parameters"
]
},
2023-03-22 14:25:21 +01:00
{
"title": "check 'tls_certificate'",
"type": "object",
"unevaluatedProperties": false,
"properties": {
"kind": {
"type": "string",
"enum": [
"tls_certificate"
]
},
"parameters": {
"type": "object",
"additionalProperties": false,
"properties": {
"host": {
"type": "string"
},
"strict": {
"description": "whether a violation of this check shall be leveled as critical instead of concerning",
"type": "boolean",
"default": true
},
"expiry_threshold": {
"description": "in days; allowed amount of valid days before the certificate expires",
"type": [
"null",
"integer"
],
"default": 7,
"minimum": 0
}
},
"required": [
"host"
]
}
},
"required": [
"kind",
"parameters"
]
},
{
2023-02-06 16:06:18 +01:00
"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"
]
},
2022-12-15 15:51:07 +01:00
"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": []
},
2022-12-12 12:31:51 +01:00
"strict": {
"description": "whether a violation of this check shall be leveled as critical instead of concerning",
"type": "boolean",
2022-12-12 12:31:51 +01:00
"default": true
}
},
"required": [
"request"
]
}
},
"required": [
"kind",
"parameters"
]
2023-03-03 15:31:57 +01:00
},
{
"title": "check 'generic_remote'",
"type": "object",
"unevaluatedProperties": false,
"properties": {
"kind": {
"type": "string",
"enum": [
"generic_remote"
]
},
"parameters": {
"type": "object",
"additionalProperties": false,
"properties": {
2023-03-22 14:25:21 +01:00
"host": {
2023-03-03 15:31:57 +01:00
"type": "string"
},
2023-03-03 19:38:04 +01:00
"ssh_port": {
"type": [
"null",
"integer"
],
"default": null
2023-03-03 15:31:57 +01:00
},
2023-03-03 19:38:04 +01:00
"ssh_user": {
"type": [
"null",
"string"
],
"default": null
2023-03-03 15:31:57 +01:00
},
"ssh_key": {
2023-03-03 19:38:04 +01:00
"type": [
"null",
"string"
],
"default": null
2023-03-03 15:31:57 +01:00
},
"mount_point": {
"type": "string",
"default": "/"
},
"threshold": {
"type": "integer",
"default": 95,
"description": "maximaler F\u00fcllstand in Prozent"
},
"strict": {
"type": "boolean",
"default": false
}
},
"required": [
2023-03-22 14:25:21 +01:00
"host"
2023-03-03 15:31:57 +01:00
]
}
},
"required": [
"kind",
"parameters"
]
}
]
}
]
}
}
},
2023-03-03 18:50:21 +01:00
"required": []
}