.maintain/monitoring: Add alerting rule tests (#6343)

* .maintain/monitoring: Add alerting rule tests

* .maintain/monitoring/alerting-rules/alerting-rules.yaml: Break lines

* .gitlab-ci.yml: Add promtool rule testing step
This commit is contained in:
Max Inden
2020-06-19 08:31:42 +02:00
committed by GitHub
parent 015693227b
commit fe76ebd548
3 changed files with 271 additions and 15 deletions
+1
View File
@@ -367,6 +367,7 @@ test-prometheus-alerting-rules:
- curl -L https://github.com/prometheus/prometheus/releases/download/v2.19.0/prometheus-2.19.0.linux-amd64.tar.gz --output prometheus.tar.gz
- tar -xzf prometheus.tar.gz
- ./prometheus-*/promtool check rules .maintain/monitoring/alerting-rules/alerting-rules.yaml
- cat .maintain/monitoring/alerting-rules/alerting-rules.yaml | ./prometheus-*/promtool test rules .maintain/monitoring/alerting-rules/alerting-rule-tests.yaml
#### stage: build