prometheus / alertmanager

Prometheus Alertmanager
https://prometheus.io
Apache License 2.0
6.55k stars 2.13k forks source link

Docker image prom/alertmanager:v0.27.0 fails to parse webhook_url_file from msteams_config #3894

Open martipoe opened 2 months ago

martipoe commented 2 months ago

What did you do?

I tried to use the latest Docker Image prom/alertmanager:v0.27.0 with a webhook_url_file in https://prometheus.io/docs/alerting/latest/configuration/#msteams_config, because the feature should be supported for 0.27.0 according to the Changelog.

What did you expect to see?

Prometheus should be able to read the URL from webhook_url_file.

What did you see instead? Under which circumstances?

The docker container displays the error and keeps restarting: ts=2024-06-23T20:09:11.319Z caller=coordinator.go:118 level=error component=configuration msg="Loading configuration file failed" file=/etc/alertmanager/alertmanager.yml err="no msteams webhook URL provided"

This issue does not occur with prom/alertmanager:main, then the webhook_url_file is read successfully.

Environment

alertmanager, version 0.27.0 (branch: HEAD, revision: 0aa3c2aad14cff039931923ab16b26b7481783b5)
  build user:       root@22cd11f671e9
  build date:       20240228-11:51:20
  go version:       go1.21.7
  platform:         linux/amd64
  tags:             netgo
grobinson-grafana commented 2 months ago

I think there was a bug in 0.27.0 which prevents this from working (see https://github.com/prometheus/alertmanager/pull/3728). The fix should be in the next release. However, I'm not sure when that will be, so you might need to keep using the main image until 0.27.1 is released.

TornaxO7 commented 2 months ago

Funny enough, webhook_url_file also fails for the discord_config.

EDIT: Well, I just realized that the author of the PR added this information to the title as well...