Public source validation / validate (push) Failing after 3m8s
172 lines
3.3 KiB
JSON
172 lines
3.3 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://itworx.local/pulse/specs/alert-rule.schema.json",
|
|
"title": "Pulse alert rule",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schemaVersion",
|
|
"id",
|
|
"name",
|
|
"enabled",
|
|
"severity",
|
|
"scope",
|
|
"condition",
|
|
"evaluationIntervalSeconds",
|
|
"pendingSeconds",
|
|
"resolveSeconds",
|
|
"unknownBehavior",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"schemaVersion": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 160
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"severity": {
|
|
"type": "string",
|
|
"enum": [
|
|
"attention",
|
|
"degraded",
|
|
"critical"
|
|
]
|
|
},
|
|
"scope": {
|
|
"type": "object",
|
|
"maxProperties": 20
|
|
},
|
|
"condition": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"inputType",
|
|
"operator"
|
|
],
|
|
"properties": {
|
|
"inputType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"metric",
|
|
"entity-status",
|
|
"event",
|
|
"datasource-health"
|
|
]
|
|
},
|
|
"metric": {
|
|
"type": "string",
|
|
"maxLength": 160
|
|
},
|
|
"operator": {
|
|
"type": "string",
|
|
"enum": [
|
|
">",
|
|
">=",
|
|
"<",
|
|
"<=",
|
|
"==",
|
|
"!=",
|
|
"matches",
|
|
"absent"
|
|
]
|
|
},
|
|
"threshold": {
|
|
"type": [
|
|
"number",
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"recoveryThreshold": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
},
|
|
"aggregation": {
|
|
"type": "string",
|
|
"maxLength": 40
|
|
},
|
|
"windowSeconds": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 2592000
|
|
}
|
|
}
|
|
},
|
|
"evaluationIntervalSeconds": {
|
|
"type": "integer",
|
|
"minimum": 5,
|
|
"maximum": 3600
|
|
},
|
|
"pendingSeconds": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 2592000
|
|
},
|
|
"cooldownSeconds": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 2592000
|
|
},
|
|
"resolveSeconds": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 2592000
|
|
},
|
|
"unknownBehavior": {
|
|
"type": "string",
|
|
"enum": [
|
|
"retain-firing-as-unknown",
|
|
"become-unknown",
|
|
"ignore-short-gap"
|
|
]
|
|
},
|
|
"groupBy": {
|
|
"type": "array",
|
|
"maxItems": 10,
|
|
"items": {
|
|
"type": "string",
|
|
"maxLength": 80
|
|
}
|
|
},
|
|
"suppressWhen": {
|
|
"type": "array",
|
|
"maxItems": 20,
|
|
"items": {
|
|
"type": "string",
|
|
"maxLength": 160
|
|
}
|
|
},
|
|
"message": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"titleKey",
|
|
"bodyKey"
|
|
],
|
|
"properties": {
|
|
"titleKey": {
|
|
"type": "string",
|
|
"maxLength": 160
|
|
},
|
|
"bodyKey": {
|
|
"type": "string",
|
|
"maxLength": 160
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|