Skip to content

[FEATURE] Add support for Mattermost channel as destination #1048

@spapadop

Description

@spapadop

Is your feature request related to a problem?
Up until OpenSearch v3, we were using Slack destination type with the Mattermost channel webhooks and that was working fine, as the message has the same format, i.e., {"text": "my-message"}. However, after a url validation got in-place (#814) this no longer works.

What solution would you like?
Since it was decided that the Slack destination type should follow its own lonely path, there needs to be a solution for other type of tools that use {"text": "my-message"} format.

I list below some possible solutions, but feel free to counter-suggest others:

  1. Create a dedicated Mattermost channel destination type, similar to the Slack one, but with a different webhook url validation (Regex("https://.*/hooks/.*") instead of Regex("https://hooks\\.(?:gov-)?slack\\.com/services"))).
  2. Extend the custom webhook destination type to support either any format, or at least the {"text": "my-message"} one. This way, all previously "Slack" destinations that are not really slack, can be converted into Custom webhooks and still keep the same custom message format, instead of the default. So do not just return message.textDescription. Essentially, as suggested here: [FEATURE] Enhance custom webhooks to support custom message formats for request bodies #818
  3. Revert Adds webhook format check for Slack #814 and optionally then generalise the "slack" destination name, as this destination type can be used for multiple tools (not just slack).

What alternatives have you considered?
We can always wrap Alert monitors text with {"text": "my-alert-message"} format. It works, but that is not elegant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions