mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
0fc1130f47
…flags to perform the same as vmalert address https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6735 --------- Signed-off-by: hagen1778 <roman@victoriametrics.com> Co-authored-by: hagen1778 <roman@victoriametrics.com>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
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:
|
|
- labels: '{__name__="suquery_interval_test", cluster="prod", instance="localhost:9090", job="vmagent2"}'
|
|
value: 1
|
|
|
|
alert_rule_test:
|
|
- eval_time: 2h
|
|
groupname: group1
|
|
alertname: InstanceDown
|
|
exp_alerts:
|
|
- exp_labels:
|
|
job: vmagent2
|
|
severity: page
|
|
instance: localhost:9090
|
|
cluster: prod
|
|
exp_annotations:
|
|
summary: "Instance localhost:9090 down"
|
|
description: "localhost:9090 of job vmagent2 in cluster prod has been down for more than 5 minutes."
|
|
dashboard: "http://grafana:3000/d/dashboard?orgId=1"
|
|
|
|
- eval_time: 0
|
|
groupname: group1
|
|
alertname: AlwaysFiring
|
|
exp_alerts:
|
|
- exp_labels:
|
|
cluster: prod
|
|
|
|
- eval_time: 0
|
|
groupname: group1
|
|
alertname: InstanceDown
|
|
exp_alerts: []
|
|
|