【问题标题】:Prometheus example alerting config does not validatePrometheus 示例警报配置未验证
【发布时间】:2019-05-23 23:29:20
【问题描述】:

提供的示例配置: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 "="

我哪里错了?这个语法过时了吗?

【问题讨论】:

    标签: prometheus


    【解决方案1】:

    我使用的是 v1.8,而文档是 v2+...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-13
      • 1970-01-01
      • 2021-09-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多