YAML-Schema for Alert Rule Definitions¶
Validation required
When uploading an alert rule definition file, it will be validated against the following schema, so make sure to match it
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/AlertRules",
"definitions": {
"AlertRules": {
"type": "object",
"additionalProperties": false,
"properties": {
"schema": {
"type": "number"
},
"criterias": {
"$ref": "#/definitions/Criterias"
}
},
"required": ["criterias", "schema"],
"title": "AlertRules"
},
"Criterias": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9]*$": {
"$ref": "#/definitions/Criteria"
}
},
"title": "Criterias"
},
"Criteria": {
"type": "object",
"additionalProperties": false,
"properties": {
"displayName": {
"$ref": "#/definitions/Translation"
},
"description": {
"$ref": "#/definitions/Translation"
},
"parts": {
"$ref": "#/definitions/PartElement"
}
},
"required": ["description", "displayName", "parts"],
"title": "Criteria"
},
"Translation": {
"type": "object",
"additionalProperties": false,
"properties": {
"en": {
"type": "string"
},
"es": {
"type": "string"
},
"de": {
"type": "string"
}
},
"required": ["de", "en", "es"],
"title": "Translation"
},
"PartElement": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9]*$": {
"$ref": "#/definitions/PartPart"
}
},
"title": "PartElement"
},
"PartPart": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"type": "string"
},
"title": {
"$ref": "#/definitions/Translation"
},
"values": {
"$ref": "#/definitions/Values"
},
"type": {
"type": "string"
}
},
"required": ["field", "title"],
"title": "PartPart"
},
"Values": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9]*$": {
"$ref": "#/definitions/Translation"
}
},
"title": "Values"
}
}
}