prometheus / prometheus/alertmanager

Alertmanager not supported other slack compatibility config (Mattermost)

Open
#5,557 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/support
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

What did you do?

Not work update_message for mattermost
I create issue https://github.com/prometheus-operator/prometheus-operator/issues/8808#issuecomment-5633648340 but reported ALSO here

Steps to Reproduce

slack_configs:
  - channel: '#alerts-staging'
    send_resolved: true
    title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
    api_url: https://mymat.mycompany.us/api/chat.postMessage
    #app_url: https://mymat.mycompany.us/api/chat.postMessage
    http_config:
      authorization:
          credentials: "mypasswd"
    update_message: true

I found hard code

https://github.com/search?q=repo%3Aprometheus%2Falertmanager+https%3A%2F%2Fslack.com%2Fapi%2Fchat.postMessage&type=code

What did you expect to see?

all work no checked hard code api_url

What did you see instead? Under which circumstances?

api_url must be set to https://slack.com/api/chat.postMessage

System information

Linux 6.12.0-124.45.1.el10_1.x86_64 x86_64

Alertmanager version
alertmanager, version 0.33.1 (branch: HEAD, revision: 2c8da51e03f3dbbed24f9711ca2d76aab4eef9c5)
  build user:       root@34d840a05dd5
  build date:       20260704-19:26:21
  go version:       go1.26.4
  platform:         linux/amd64
  tags:             netgo
Alertmanager configuration file
.....
slack_configs:
  - channel: '#alerts-staging'
    send_resolved: true
    title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
    api_url: https://mymat.mycompany.us/api/chat.postMessage
    #app_url: https://mymat.mycompany.us/api/chat.postMessage
    http_config:
      authorization:
          credentials: "mypasswd"
    update_message: true
Prometheus version
prometheus, version 3.11.3 (branch: HEAD, revision: eb173f5256d4022afba1e9bc3d19740a76859fae)
  build user:       root@83aad33dd38e
  build date:       20260427-14:45:32
  go version:       go1.26.2
  platform:         linux/amd64
  tags:             netgo,builtinassets
Prometheus configuration file
It doesn't matter if the problem is in Alertmanager.
Logs
api_url must be set to https://slack.com/api/chat.postMessage
CPU profiles

It doesn't matter

Memory profiles

It doesn't matter

Number of alerts

No response

Number of silences

No response

prometheus-operator checklist
  • I have confirmed this issue is not caused by a missing feature in prometheus-operator.
  • I have reproduced this issue when running Alertmanager directly (without prometheus-operator).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the hard-coded https://slack.com/api/chat.postMessage check used by slack_configs when update_message is enabled. Reproduce the provided Mattermost configuration and verify that a non-Slack api_url works with update_message, including the existing error path and relevant tests if found.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.