Although Prometheus says that the alerts are fired, my alert manager does not receive any alerts. It says "No Alerts".
This is just for testing purposes in my local machine. Here is my prometheus.yml
---
rule_files:
- ~/Documents/prometheus-data/alert.rules
scrape_configs:
- job_name: node
scrape_interval: 15s
static_configs:
- targets:
- "127.0.0.1:9100"
I use the following command to start prometheus.
./prometheus -config.file=prometheus.yml -alertmanager.url=http://127.0.0.1:9093
Am I missing anything?
I believe the issue is the path to your rules file at
~/Documents/prometheus-data/alert.rules
, notably the~
character.Moving the rules rules file to the same directory as Prometheus and referencing it as just
alert.rules
worked for me when I tested your setup. I also tested removing the~
character and using the absolute path to thealert.rules
file which also worked.