Reputation: 23
I am trying to start prometheus and alert manager using docker.
However, when running docker-compose up I hit this error:
msg="Loading configuration file failed"
file=/etc/alertmanager/alertmanager.yml err="open
/etc/alertmanager/alertmanager.yml: no such file or directory"
docker-compose.yaml:
version: '2'
services:
prometheus:
image: prom/prometheus
privileged: true
volumes:
- ./prometheus:/etc/prometheus/
- ./alertmanager:/alert.rules
command:
- --config.file=/etc/prometheus/prometheus.yml
ports:
- '9090:9090'
node-exporter:
image: prom/node-exporter
ports:
- '9100:9100'
alertmanager:
image: prom/alertmanager
privileged: true
volumes:
- ./alertmanager:/etc/alertmanager/
command:
- --config.file=/etc/alertmanager/alertmanager.yml
ports:
- '9093:9093'
alertmanager.yaml
global:
slack_api_url: 'https://hooks.slack.com/services/eufiwbhfgvehjvfeyvfhevhfvey
route:
receiver: 'slack'
receivers:
- name: 'slack'
slack_configs:
- send_resolved: true
username: 'alert'
channel: '#wgeygyhvdwvy'
Prometheus and node-exporter both and runs fine, the file structure for Alertmanager matches Prometheus so can't see where I am going wrong
Upvotes: 2
Views: 3004
Reputation: 2208
Alertmanager is complaining that it can't find alertmanager.yml
but you mention the name of your file being alertmanager.yaml
. (The file name suffix: yml
vs yaml
.)
Upvotes: 1