prometheus.rules.test.json
Prometheus rules test file
| Type | object |
|---|---|
| File match |
*.prometheus.tests.yml
*.prometheus.tests.yaml
*.prometheus.test.yml
*.prometheus.test.yaml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/prometheus-rules-test-json/latest.json |
| Source | https://www.schemastore.org/prometheus.rules.test.json |
Validate with Lintel
npx @lintel/lintel check
Prometheus rules test file. See https://prometheus.io/docs/prometheus/latest/configuration/unit_testing_rules/ for details.
Properties
The evaluation interval for the tests. [duration] format.
The order in which group names are listed below will be the order of evaluation of rule groups (at a given evaluation time).
List of rule files to consider for testing. Globs are supported.
Definitions
Name of the alert to be tested.
List of expected alerts firing under the given alertname at the given evaluation time
PromQL expression to evaluate
Expected samples at the given evaluation time.
Labels of the sample in the usual series notation '
Expected value of the PromQL expression.
This follows the usual series notation '
This uses expanded notation to project time series. There are also the special _ and stale values to indicate missing or stale samples
A list of time series
Unit tests for alerting rules. We only consider the alerting rules from the input files.
External URL accessible to the alert template. Usually set using --web.external-url.
Name of the test group
Unit tests for PromQL expressions