Hi
We are evaluating using Prometheus v. 2.15.2. Here's my prometheus.yml:
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
external_labels:
monitor: "example"
rule_files:
- "alert.rules"
alerting:
alertmanagers:
- static_configs:
- targets:
- 'localhost:9093'
scrape_configs:
- job_name: "prometheus"
scrape_interval: 5s
scrape_timeout: 5s
static_configs:
- targets:
- localhost:9090
- job_name: node
static_configs:
- targets:
- localhost:9100
Here's the alert rule file, alert.rules:
groups:
- name: alert.rules
rules:
- alert: InstanceDown
expr: up == 0
for: 1m
labels:
severity: "critical"
annotations:
summary: "Endpoint {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minutes."
I've ran promtool check rule on this rule file and it passes. Looking thru docker log:
level=info ts=2020-04-17T21:36:28.087Z caller=main.go:734 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
....
level=info ts=2020-04-17T21:36:28.092Z caller=main.go:762 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml
level=info ts=2020-04-17T21:36:28.092Z caller=main.go:617 msg="Server is ready to receive web requests."
but in the UI under Rules it says: "No rules defined". How can I go about troubleshooting what is wrong?
Thanks,
Derek