This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://json.schemastore.org/prometheus.rules.json", | ||
"additionalProperties": false, | ||
"description": "alertmanager rules list file", | ||
"definitions": { | ||
"duration": { | ||
"type": ["string", "null"], | ||
"pattern": "^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$", | ||
"minLength": 1 | ||
}, | ||
"labels": { | ||
"type": ["object", "null"], | ||
"patternProperties": { | ||
"^[a-zA-Z_][a-zA-Z0-9_]*$": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"annotations": { | ||
"type": ["object", "null"], | ||
"patternProperties": { | ||
"^[a-zA-Z_][a-zA-Z0-9_]*$": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"pattern": "^[a-z0-9]+\\.rules$" | ||
}, | ||
"rules": { | ||
"type": ["array"], | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"alert": { | ||
"description": "The name of the alert. Must be a valid metric name.", | ||
"type": "string" | ||
}, | ||
"expr": { | ||
"description": "The PromQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.", | ||
"type": "string" | ||
}, | ||
"for": { | ||
"$ref": "#/definitions/duration", | ||
"description": "Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending." | ||
}, | ||
"keep_firing_for": { | ||
"$ref": "#/definitions/duration", | ||
"description": "How long an alert will continue firing after the condition that triggered it has cleared." | ||
}, | ||
"labels": { | ||
"$ref": "#/definitions/labels", | ||
"description": "Labels to add or overwrite for each alert." | ||
}, | ||
"annotations": { | ||
"$ref": "#/definitions/annotations", | ||
"description": "Annotations to add to each alert." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |