在https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
处提供的示例配置groups:
- name: example
rules:
- alert: HighErrorRate
expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5
for: 10m
labels:
severity: page
annotations:
summary: High request latency
但是,如果我尝试验证此文件:
promtool check-rules rules al.yaml
Checking rules
FAILED: cannot get file info
Checking al.yaml
FAILED: parse error at line 2, char 2: unexpected <op:-> in record statement, expected "="
我要去哪里错了?这种语法过时了吗?
答案 0 :(得分:0)
我正在使用v1.8,而该文档是用于v2 + ...