普罗米修斯警报测试问题

时间:2018-12-17 08:25:21

标签: prometheus

我正在使用Prometheus 2.5,并按照此处的测试教程https://prometheus.io/docs/prometheus/2.5/configuration/unit_testing_rules/

user@nb ~/Downloads/prometheus-2.5.0.linux-amd64 $ ./promtool check rules test.yml
Checking test.yml
  FAILED:
yaml: unmarshal errors:
  line 4: field rule_files not found in type rulefmt.RuleGroups
  line 7: field evaluation_interval not found in type rulefmt.RuleGroups
  line 9: field tests not found in type rulefmt.RuleGroups

我按照教程中的说明创建了alert.yml和test.yml。   不知道在哪里可以找到rulefmt.RuleGroups或如何更新它。

1 个答案:

答案 0 :(得分:0)

check rules是对规则文件的语法检查。您希望test rules运行PromQL单元测试。