1
私が稼働してプロメテウス警告を取得しようとしているが、アラートを定義するとき、それは常に構文が、私はプロメテウスにプロメテウスルールエラー
./prometheus -config.file=prometheus.yml -alertmanager.url http://localhost:9093
を開始するために使用してい
コマンド間違っていることを私に伝えますここ
は、私がここに
prometheus, version 0.15.1 (branch: master, revision: 64349aa)
build user: [email protected]
build date: 20150727-17:56:51
go version: 1.4.2
INFO[0000] Loading configuration file prometheus.yml file=main.go line=173
ERRO[0000] Error loading rules, previous rule set restored: error parsing /home/ubuntu/alert.rules: Parse error at line 4, char 4: alert summary missing file=manager.go line=348
を取得し、エラーがalert.ruleファイルが
ALERT node_down
IF up == 0
FOR 5m
LABELS {
severity="critical"
}
ANNOTATIONS {
summary = "Instance {{$labels.instance}} down",
description = "{{$labels.instance}} of job {{$labels.job}} has been down for more than 5 minutes."
}
0123です
そして、これは、アラートの周りにわずかに異なる構文を持っていたプロメテウスのかなり古いバージョンのMy prometheus.ymlファイル
global:
scrape_interval: 15s
evaluation_interval: 15s
'evaluation_interval'.
rule_files:
- "/home/ubuntu/alert.rules"
scrape_configs:
- job_name: 'prometheus'
target_groups:
- targets: ['localhost:9100','xxx.xxx.xxx.xxx:9100']
これが問題でした!どうもありがとうございました。私はバージョン0.15を使用していました(なぜか分かりません)。作業したのは1.5 –
アラートルールの正しい書式は?を参照してください。 (https://github.com/prometheus/docs/issues/907) –