Skip to content

Fix alertmanager config path in docker compose#728

Merged
vincent-olivert-riera merged 1 commit into
line:masterfrom
louishhy:master
May 12, 2026
Merged

Fix alertmanager config path in docker compose#728
vincent-olivert-riera merged 1 commit into
line:masterfrom
louishhy:master

Conversation

@louishhy
Copy link
Copy Markdown
Contributor

Summary

Fix alertmanager config path in docker compose so it reads the configuration file from docker/alertmanager.yml.

Currently the alertmanager service in docker-compose.yml mounts ./docker to /etc/prometheus.

However, the alertmanager service runs with

--config.file=/etc/alertmanager/alertmanager.yml

which reads the default config inside the image and hence ignoring the promgen webhook receiver.

Verification

Before the fix:

docker compose up -d
docker compose exec alertmanager sh
cat /etc/alertmanager/alertmanager.yml

will return the default config

route:
  group_by: ['alertname']
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 1h
  receiver: 'web.hook'
receivers:
  - name: 'web.hook'
    webhook_configs:
      - url: 'http://127.0.0.1:5001/'
inhibit_rules:
  - source_matchers: [severity="critical"]
    target_matchers: [severity="warning"]
    # Apply inhibition if the alertname is the same.
    # CAUTION:
    #   If all label names listed in `equal` are missing
    #   from both the source and target alerts,
    #   the inhibition rule will apply!
    equal: [alertname, dev, instance]

instead of the config in docker/alertmanager.yml:

receivers:
- name: "default"
  webhook_configs:
  - url: http://web:8000/api/v1/alerts

Fix

Update the docker-compose.yml to correctly mount ./docker/alertmanager.yml to /etc/alertmanager/alertmanager.yml.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 11, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@vincent-olivert-riera vincent-olivert-riera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@vincent-olivert-riera vincent-olivert-riera merged commit f781eec into line:master May 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants