Skip to content

Conversation

@madest92
Copy link

Default Mattermost receiver webhook_url/webhook_url_file from global settings

Default Mattermost receiver webhook_url/webhook_url_file from global settings

Signed-off-by: Kliachin Aleksei <madest92@gmail.com>
@TheMeier
Copy link
Contributor

Since #4812 was merged could you please try to follow it's pattern where possible?

@madest92
Copy link
Author

Since #4812 was merged could you please try to follow it's pattern where possible?

I've reviewed the changes. This doesn't apply to mattermost_api_url/mattermost_api_url_file.

Conflict fixed.

@madest92 madest92 requested a review from TheMeier February 2, 2026 11:06
@madest92
Copy link
Author

madest92 commented Feb 2, 2026

@TheMeier
I'd actually like to do a small refactoring of the MM configuration. Sending messages via attachment, like in Slack.
Move the attachments up a level and add the define templates.

Now you need to write like this:

mattermost_configs:
  - webhook_url: '.....'
    username: '{{ template "__alertmanager" . }}'
    text: ''
    attachments:
      - color: '{{ if eq .Status "firing" }}danger{{ else }}good{{ end }}'
        title: '{{ .CommonAnnotations.summary }}'
        title_link: '{{ template "__alertmanagerURL" . }}'
        text: '{{ range .Alerts }}{{ .Annotations.description }}{{ end }}'

Instead of

mattermost_configs:
  - text: 'if you want update default'
    title: 'if you want update default'
    ....

What do you think about this?
Yes, it will break the current behavior. But it will be more familiar to everyone.

I can submit changes as part of this merge request, or create a new one once the current one is accepted.
What's best?

@TheMeier
Copy link
Contributor

TheMeier commented Feb 2, 2026

I personally think this should be two separate changes. Adding something is a completly different beast than breaking changes.

@madest92
Copy link
Author

madest92 commented Feb 2, 2026

Okay, then I'm waiting for the current changes to be accepted.

@madest92
Copy link
Author

madest92 commented Feb 4, 2026

@TheMeier hi

Do you have any comments on Mr?

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.

2 participants