prometheus can't load rule_files

prometheus, version 2.7.2 (branch: HEAD, revision: 82f98c8)
build user: [email protected]
build date: 20190302-14:57:04
go version:go1.11.5

All program in docker.
prometheus.yml

# my global config
global:
  scrape_interval:     10s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 10s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
  alertmanagers:
  - static_configs:
    - targets: ['192.168.0.238:9093']

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"
  - "/docker/prometheus/sd_config/alert_rules/alertmanager_rules.yml"

alertmanager_rules.yml

groups:
 - name: alert-name
   rules:
   - alert: InstanceDown # 告警名称
     expr: up == 0 # 告警的判定条件,参考Prometheus高级查询来设定
     for: 2m # 满足告警条件持续时间多久后,才会发送告警
     labels: #标签项
       team: node
     annotations: # 解析项,详细解释告警信息
       summary: "{{$labels.instance}}: has been down"
       description: "{{$labels.instance}}: job {{$labels.job}} has been down "
       value: {{$value}}

prometheus config
alertmanager_rules file

but I can see any rules in web.
http://192.168.0.10:9090/alerts
I get "No alerting rules defined "
web alert image

http://192.168.0.10:9090/rules
I get "No rules defined "
web rules image

In alertmanager web
http://192.168.0.238:9093/#/alerts
I get "No alerts found"

728x90

0 Answers prometheus can't load rule_files