2023-10-13 11:54:33 +00:00
|
|
|
rule_files:
|
|
|
|
- rules.yaml
|
|
|
|
|
|
|
|
evaluation_interval: 1m
|
|
|
|
|
|
|
|
tests:
|
|
|
|
- interval: 1m
|
|
|
|
input_series:
|
|
|
|
- series: 'up{job="vmagent2", instance="localhost:9090"}'
|
|
|
|
values: "0+0x1440"
|
|
|
|
|
|
|
|
metricsql_expr_test:
|
|
|
|
- expr: suquery_interval_test
|
|
|
|
eval_time: 4m
|
|
|
|
exp_samples:
|
2024-08-19 19:29:28 +00:00
|
|
|
- labels: '{__name__="suquery_interval_test", instance="localhost:9090", job="vmagent2"}'
|
2023-10-13 11:54:33 +00:00
|
|
|
value: 1
|
|
|
|
|
|
|
|
alert_rule_test:
|
|
|
|
- eval_time: 2h
|
|
|
|
alertname: InstanceDown
|
|
|
|
exp_alerts:
|
|
|
|
- exp_labels:
|
|
|
|
job: vmagent2
|
|
|
|
severity: page
|
|
|
|
instance: localhost:9090
|
|
|
|
exp_annotations:
|
|
|
|
summary: "Instance localhost:9090 down"
|
2024-08-19 19:29:28 +00:00
|
|
|
description: "localhost:9090 of job vmagent2 in cluster has been down for more than 5 minutes."
|
|
|
|
dashboard: "/d/dashboard?orgId=1"
|
2023-10-13 11:54:33 +00:00
|
|
|
|
|
|
|
- eval_time: 0
|
|
|
|
alertname: AlwaysFiring
|
|
|
|
exp_alerts:
|
2024-08-19 19:29:28 +00:00
|
|
|
- {}
|
2023-10-13 11:54:33 +00:00
|
|
|
|
|
|
|
- eval_time: 0
|
|
|
|
alertname: InstanceDown
|
|
|
|
exp_alerts: []
|