This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"$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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user